Sidebar
0 votes
35 views
by gary-t-8719 (15.3k points)
There are two functions that can be used on the Source Node to add messages to the channel for processing. They are qie.addInboundMessage(record, originalFilename) and qie.queueInboundMessage(record, originalFilename). What are the differences?

1 Answer

0 votes
There are two functions that can be used on the Source Node to add messages to the channel for processing: qie.addInboundMessage(record, originalFilename) and qie.queueInboundMessage(record, originalFilename). What are the differences?

1. qie.addInboundMessage(record, originalFilename)

Adds messages to the inbound queue one at a time. Use this method when message order matters and the channel is configured to process messages in the order received.

It takes two parameters:

   record: a String or byte[]

   originalFilename: a String representing the filename of the message to be processed

2. qie.queueInboundMessage(record, originalFilename)

Adds messages to the inbound queue using a multi-threaded process. This allows for higher throughput, but the order in which messages are added and processed is not preserved.

It also takes the same two parameters:

   record: a String or byte[]

   originalFilename: a String representing the filename of the message to be processed

Note: Use qie.queueInboundMessage when message processing order does not matter and higher throughput is required. Use qie.addInboundMessage when message order matters and the channel is configured to process messages in the order received.
by gary-t-8719 (15.3k points)
...