Topic
  • 3 replies
  • Latest Post - ‏2014-07-09T09:34:28Z by TrushkinAndrey
H9R0_Souvik_Saha_Bhowmik
7 Posts

Pinned topic How can I read a queue in the middle of a flow

‏2014-07-08T05:17:12Z |

Hi,

 

I do not want to intiate a flow from a queue or post message to a queue, but will need to retrieve a message (like a service invoke) from queue in the middle of the flow. How can I achieve that.? Do I need to have an Interface with only reply parameter and bind an import?

 

Souvik

  • TrushkinAndrey
    TrushkinAndrey
    71 Posts

    Re: How can I read a queue in the middle of a flow

    ‏2014-07-08T10:18:24Z  

    Hi.

     

    If I understand your situation correctly, this is not the best pattern for implement in mediation flow. Mediation flow is not long-running process, it has time boundaries. Default time bound is global transaction with 120 s timeout, main flexible choise is acting in transaction logic like local application, but in this way application server will break this thread like hung after specified in server settings period of time.

    You can't know moment when message will be in queue, so wait time in mediation can be very long.

     

    Andrey.

  • H9R0_Souvik_Saha_Bhowmik
    7 Posts

    Re: How can I read a queue in the middle of a flow

    ‏2014-07-09T04:53:19Z  

    Hi.

     

    If I understand your situation correctly, this is not the best pattern for implement in mediation flow. Mediation flow is not long-running process, it has time boundaries. Default time bound is global transaction with 120 s timeout, main flexible choise is acting in transaction logic like local application, but in this way application server will break this thread like hung after specified in server settings period of time.

    You can't know moment when message will be in queue, so wait time in mediation can be very long.

     

    Andrey.

    Hi Andrey,

     

    That's correct. But if I do not have a fixed number of input Queue and need to retrieve the name before fetching it.

    In WMB, in case there is no message in the Queue, the thread stops in these situations. Initiation of the flow should be triggerred by something else (may be schedular).

     

    Souvik

  • TrushkinAndrey
    TrushkinAndrey
    71 Posts

    Re: How can I read a queue in the middle of a flow

    ‏2014-07-09T09:34:28Z  

    Hi Andrey,

     

    That's correct. But if I do not have a fixed number of input Queue and need to retrieve the name before fetching it.

    In WMB, in case there is no message in the Queue, the thread stops in these situations. Initiation of the flow should be triggerred by something else (may be schedular).

     

    Souvik

    Hi.

     

    In this case you should use custom code and dynamic MQJMS (or MQ, may be) endpoint. There are some technichs to work with dynamic endpoint, information about it you can find in infocenter: http://pic.dhe.ibm.com/infocenter/esbsoa/wesbv7r5m1/index.jsp?topic=%2Fcom.ibm.websphere.wesb.main.doc%2Ftaghubs%2Fdynamic_invocation.html,

    or some articles:

    http://david.currie.name/archives/2008/07/15/dynamic-jms-endpoints,

    http://eaisolutionsbymahesh.blogspot.ru/2012/12/dynamic-invocation-in-wesb.html