You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Dan Hatfield <da...@gmail.com> on 2010/01/07 02:30:05 UTC

JMS bindings and correlation

The binding.jms spec seems to deal with messaging correlation on two fronts:

1) Using @correlationScheme to define the behavior of a service exposed via
JMS bindings.
2) Using @JMSCorrelationID to define correlation behavior when interacting
with a service via JMS

However, it seems while @correlationScheme alllows you to define a pattern
of behavior (RequestMsgIDToCorrelID or RequestCorrelIDToCorrelID),
JMSCorrelationID simply allows for constants like
JMSCorrelationID="12345"....

Whereas what I'd really like is the ability to indicate a pattern of
behavior like JMSCorrelationID="RequestMsgIDToCorrelID"....

In other words, I want to tell a service using a reference that is bound to
JMS bindings to interact with JMS using correlation. I would like JMS
bindings to automatically look for a message on the response queue that has
a correlation ID that matches the message ID on the message it just put onto
the request queue (standard msg id to correlation id behavior). It doesn't
seem like I can configure it do this.

Am I missing something here? Does Tuscany provide any extensions that would
allow me to do this?

Otherwise, it seems I have to fall back on dynamic reply to queues. Any
other options?

Dan

Re: JMS bindings and correlation

Posted by ant elder <an...@gmail.com>.
On Thu, Jan 7, 2010 at 1:30 AM, Dan Hatfield <da...@gmail.com> wrote:
> The binding.jms spec seems to deal with messaging correlation on two fronts:
>
> 1) Using @correlationScheme to define the behavior of a service exposed via
> JMS bindings.
> 2) Using @JMSCorrelationID to define correlation behavior when interacting
> with a service via JMS
>
> However, it seems while @correlationScheme alllows you to define a pattern
> of behavior (RequestMsgIDToCorrelID or RequestCorrelIDToCorrelID),
> JMSCorrelationID simply allows for constants like
> JMSCorrelationID="12345"....
>
> Whereas what I'd really like is the ability to indicate a pattern of
> behavior like JMSCorrelationID="RequestMsgIDToCorrelID"....
>
> In other words, I want to tell a service using a reference that is bound to
> JMS bindings to interact with JMS using correlation. I would like JMS
> bindings to automatically look for a message on the response queue that has
> a correlation ID that matches the message ID on the message it just put onto
> the request queue (standard msg id to correlation id behavior). It doesn't
> seem like I can configure it do this.
>
> Am I missing something here? Does Tuscany provide any extensions that would
> allow me to do this?
>
> Otherwise, it seems I have to fall back on dynamic reply to queues. Any
> other options?
>
> Dan
>

You're right the spec doesn't define how to do that and Tuscany
doesn't currently provide any way to do that. Its interesting though
and seems like a reasonable thing to support. The spec doesn't
disallow this so we could easily enough add some code to the Tuscany
binding to handle it (I'll also mention it to the JMS spec chair to
see if this is something they've considered). If we did update Tuscany
to support this would you need this is 1.x or if it only went into the
latest OASIS based Tuscany 2.x code would you be able to use that?

  ...ant