Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8876155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:08:33+00:00 2026-06-14T19:08:33+00:00

My Usecase (in camel): if incoming message has correlationId (say clientCorrId) => leave as

  • 0

My Usecase (in camel):

  • if incoming message has correlationId (say clientCorrId) => leave as such, do nothing, as clientCorrId is used by client to map response.

  • if incoming message do not have correlationId => take messageId and put it in correlationId (at route level, not in every route that uses “jms” component)

Copying correlationId should be done only at a route level

How to do corrleationId copying at route level? (not globally as in useMessageIDAsCorrelationID as below)

<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    <!--property name="useMessageIDAsCorrelationID" value="true" / WARNING! Do not use this as we need to copy only in the beginning not everywhere -->
    <property name="transactionManager" ref="jpaTransactionManager" />
    <property name="transacted" value="true" />
</bean>

I want to avoid having a separate bean code like this to copy correlationId ONLYIF it is empty:

    if (EMPTY_MSG_ID.equals(currentCorrId)) {
        log.info("No corrId set, setting msgId to corrid :" + msgId);
        outHeader.put(correlationIdKey, msgId);
    } else {
        outHeader.put(correlationIdKey, currentCorrId);
        log.info("CorrId already set: " + currentCorrId);
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:08:35+00:00Added an answer on June 14, 2026 at 7:08 pm

    You can use an interceptor to intercept from jms endpoints, and add the missing id if needed. See http://camel.apache.org/intercept

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's one usecase that has been baffling me. When I select some text and
I have something of a simple usecase: User has a set of Privileges; when
Usecase: my hotline has phone number 0815/111222333 user starts up dialer and dials that
UseCase: Assume that rating of object is from 1 to 5 stars. It is
Usecase maintain a list of the last n visited URLs (where n is a
My usecase is a one-page site. On the page, there should be three frames.
I'm working on an usecase diagram. The customer can pay through credit card or
I have never seen the usecase for pre-increment and post-increment in actual code. The
This might not have a major usecase in projects, but I was just trying
I am creating a simple Android widget with a typical usecase of having many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.