Apache Camel - Transfer a file by MQ Websphere

0

I want to transmit a file from one server to another through Camel. When I read the file and sent it to MQ I do it in the following way:

<route id="FileToMQ">
   <from uri="file:/home/walter/Pru/Entrada"/>
   <to uri="wmq:ALPHA.QREMOTE.NOVEDADES.BETA?grouping=true&amp;groupMessageSize=2097152"/>        
</route> 

and then another route to receive the MQ message and save it again in a folder.

<route id="MQtoFile">
    <from uri="wmq2:ALPHA.ALL.NOVEDADES.BETA?grouping=true"/>
    <to uri="file:/home/walter/Pru/Salida"/>
</route>       

The problem is that a file is generated in / home / walter / Pru / Output but with a name like "ID-servidor3-49815-1518022285419-197-1"

How should I do to not lose the name of the file and that in the output the same name of the input file be generated?

Thank you very much,

Walter

    
asked by Walter 01.03.2018 в 21:28
source

1 answer

0

You should not use the grouping=true parameter.

What you are doing is adding different files in one and that implies that the result is a new Camel message, losing the original headers.

    
answered by 04.10.2018 в 12:48