This topic contains 3 replies, has 3 voices, and was last updated by  lev 2 years, 9 months ago.

To Channel – Selecting one of multiple channels

  • I am trying to create a setup whereby I have an LLP listener taking in messages, then I need to evaluate some information in the MSH segment and then what I would like to do is send to a specific channel based on the logic. If MSH.5.1 = A, then send the message off to channel ‘A’, if MSH.5.1 = B, then send the message off to channel ‘B’, and so on.

    I’ve setup two QUE -> LLP channels that connect to two different destinations. I have setup a third channel that I want to feed these two channels – it is an LLP -> QUE that takes messages in via LLP and then I am trying to use the filter to perform the logic above and send the message, not to both channels, but just one channel based on the logic.

    Do I have to configure the channels differently, or am I missing how this can be done? Any help would be greatly appreciated.

    Generally I do this by sending all messages to both channels and then configuring the filter on each receiving channel to selectively skip any messages that it should not be transmitting. Usually I accomplish this by setting up a function to evaluate the message and if it doesn’t qualify to be sent I have the main function log an informational message and exit without ever calling queue.push.

    Thanks. I had thought about that, and it is probably efficient enough for a handful of interfaces, but I’m worried about the complexity and performance when the number reaches 50 or more, which is where we are probably headed. It just seems like a lot of extra work to send all the messages to all those channels. It seems there ought to be a way to filter them inside the listener channel and pass them along to the right channel from there.

    I was wondering if there was a way from the translator to direct it to another channel; there doesn’t seem to be that I can find.

    Hello f9refresh,

    This key is in understanding that you don’t send to N channels; regardless of how many “specific channels” (as you call them in this post) you have.

    Iguana implements single queue and all channels have access to it. Every channel reads from the queue only what is relevant to *this* channel, i.e. only messages from the respective channel (in this case LLP -> QUE channel.) Find more about Iguana queue architecture in our online KB.

    The filtering takes place in Filter component of each of QUE -> LLP channels. This is by design.

    Keep Filter script logic simple. The processing is faster than most of real life interfaces require.


You must be logged in to reply to this topic.