@@ -2803,19 +2803,24 @@ def convert1(self,cfg):
2803
2803
v3_cfg .write ('#topicCopy on\n ' )
2804
2804
2805
2805
if component in [ 'sarra' , 'sender' , 'subscribe' ]:
2806
- v3_cfg .write ('#v2 sftp handling is always absolute, sr3 is relative. might need this, remove when all sr3:\n ' )
2806
+ v3_cfg .write (' \n # \n #v2 sftp handling is always absolute, sr3 is relative. might need this, remove when all sr3:\n ' )
2807
2807
v3_cfg .write ('#flowcb accept.sftp_absolute\n ' )
2808
2808
2809
2809
queueName = None
2810
2810
2811
2811
#1st prep pass (for cases when re-ordering needed.)
2812
+ already_moved = False
2813
+ verbs_to_move = [ 'auto_delete' , 'durable' , 'expire' , 'message_ttl' , 'prefetch' , \
2814
+ 'qos' , 'queueBind' , 'exchangeDeclare' ]
2815
+
2816
+
2812
2817
with open (v2_config_path , 'r' ) as v2_cfg :
2813
- for line in v2_cfg .readlines ():
2814
- if len (line .strip ()) < 1 :
2818
+ for input_line in v2_cfg .readlines ():
2819
+ if len (input_line .strip ()) < 1 :
2815
2820
continue
2816
- if line [0 ].startswith ('#' ):
2821
+ if input_line [0 ].startswith ('#' ):
2817
2822
continue
2818
- line = line .strip ().split ()
2823
+ line = input_line .strip ().split ()
2819
2824
k = line [0 ]
2820
2825
if k in synonyms :
2821
2826
k = synonyms [k ]
@@ -2825,9 +2830,15 @@ def convert1(self,cfg):
2825
2830
inflight_seen = True
2826
2831
if k in [ 'queueName' ]:
2827
2832
queueName = line [1 ]
2833
+ if k in verbs_to_move :
2834
+ if not already_moved :
2835
+ v3_cfg .write (f" \n #\n #Move formerly global options ({ ',' .join (verbs_to_move )} to start of config file.\n " )
2836
+ alread_moved = True
2837
+ v3_cfg .write (input_line + "\n " )
2838
+
2828
2839
2829
2840
if not inflight_seen and post_broker_seen and component in [ 'sarra' , 'sender' , 'subscribe' ]:
2830
- v3_cfg .write ('#sr3 inflight defaults to None, v2 defaulted to .tmp when post_broker set.\n ' )
2841
+ v3_cfg .write (' \n # \n #sr3 inflight defaults to None, v2 defaulted to .tmp when post_broker set.\n ' )
2831
2842
v3_cfg .write ('inflight .tmp\n ' )
2832
2843
2833
2844
#2nd re-write pass.
@@ -2842,6 +2853,9 @@ def convert1(self,cfg):
2842
2853
continue
2843
2854
line = line .strip ().split ()
2844
2855
k = line [0 ]
2856
+
2857
+ if k in verbs_to_move : # moved to start of file.
2858
+ continue
2845
2859
if k in synonyms :
2846
2860
k = synonyms [k ]
2847
2861
0 commit comments