Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: JMS and Spring integration

  1. #11
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    You can use the 'default-reply-queue-name' attribute. The reason it is prefixed with "default" is that IF a received Message contains an actual JMSReplyTo property, that would take precedence. Otherwise, the default as configured would be used.

    Hope that helps.
    -Mark

  2. #12

    Default

    Thanks you all for your help. It worked perfectly for me.

  3. #13

    Default

    Hi,

    As I have informed you before, the above configuration is working fine.
    I have a requirement where depending on the result from the service activator, I need to forward to different queue. As I am using "int-jms:inbound-gateway" where I mentioned my "request queue name" and "default reply queue name". But in my scenario, I cannot mentioned my "default reply queue name" as it will be dynamic.

    Can you please help in this?

  4. #14
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,034

    Default

    With a gateway, you only have the choice of sending to the JMSReplyTo supplied by the client or a default reply queue.

    Sounds like you need to use a <jms:message-driven-channel-adapter/> and send the result to a <jms:outbound-channel-adapter/> with a destination-expression that will resolve to the queue name.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  5. #15

    Default

    I dont find "destination-expression" in <jms:outbound-channel-adapter/> . I am using spring integration 2.1 version.

  6. #16
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,034

    Default

    It's been available since 2.1.0.

    Code:
    				<xsd:attribute name="destination-expression" type="xsd:string">
    					<xsd:annotation>
    						<xsd:documentation>
    A SpEL expression to be evaluated at runtime against each Spring Integration Message as
    the root object. The result should be either a Destination instance or a String representing
    the destination name. In the latter case, it will be passed to this adapter's DestinationResolver.
    If the evaluation result is null, messages will be sent to the default destination of the
    underlying JmsTemplate. This attribute is mutually exclusive with 'destination' and 'destination-name'.
    						</xsd:documentation>
    					</xsd:annotation>
    				</xsd:attribute>
    You likely have an old version of the 2.1 schema cached in STS.

    Try the following

    Window | Preferences

    Type 'cache' in the filter; in General | Network Connections | Cache, click 'Remove All'.

    Also, be sure to enable 'Spring Project Nature' on the project (right click Spring Tools...).

    Finally, ensure that 'Load NamespaceHandlers and XSDs from project's classpath' is checked in

    Window | Preferences | Spring | Beans Support | Namespaces

    and is not overridden in the project's properties.

    You may need to clean all projects after doing all this.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  7. #17

    Default

    Thanks. I am able to use "destination-expression" in <jms:outbound-channel-adapter/> and change the destination dynamically. However, it would have been really good if we could do this functionality using "int-jms:inbound-gateway".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •