0

We are currently implementing mq fte solution

One of the projects need to executive file to queue function because the target system reads only from mq .

We are looking for a way not only upload the files to queue but to keep the order of the files too.

We need that the oldest file will be uploaded first ( by modification or creation date ) and the the oldest file after him in the folder

Someone had this request on fte ? How did you handle it ?

The source system is windows .

Thanks for the assistance .

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
alex
  • 916
  • 4
  • 12
  • 26

1 Answers1

0

That depends on your setup. Is there a single queue manager in your scenario? Does the source system share the same local queue manager with the target system?

The order of messages might be guaranteed by default, as the MQ v7 Infocenter states in chapter Priority, in these cases:

If an application puts a sequence of messages on a queue, another application can retrieve those messages in the same order that they were put, provided:

  • The messages all have the same priority
  • The messages were all put within the same unit of work, or all put outside a unit of work
  • The queue is local to the putting application

If these conditions are not met, and the applications depend on the messages being retrieved in a certain order, the applications must either include sequencing information in the message data, or establish a means of acknowledging receipt of a message before the next one is sent.

If you do not meet these requirements (for example when the communication spans multiple queue managers), you can meet the requirements by:

  • ensuring that next message is put if and only if the recipient confirmed getting the previous one (for example by a MQ reply message)
  • using Message Groups to retrieve messages in logical order - that requires setting GroupId and MsgSeqNumber in the MQMD by the putting application and subsequently using MQGMO_LOGICAL_ORDER option by getting application (see chapter Logical and Physical ordering)