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

  • Home
  • SEARCH
  • 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 8876251
In Process

The Archive Base Latest Questions

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

I tried @OutHeaders outHeaderBound – I inspected in debug, I could see it is

  • 0

I tried @OutHeaders outHeaderBound – I inspected in debug, I could see it is null. If I initialize a new hashtable/map for outHeaderBound, the headers key/value were not propagated to downstream queues.

e.g code snippet:

  public void populateCorrelationId(@Body String body, @Headers Map<String, Object> headers,
    @OutHeaders Map<String, Object> outHeaderBound, Exchange exchange) {
Map<String, Object> outHeader = exchange.getOut().getHeaders();
String msgId = (String) headers.get(msgIdKey);
String currentCorrId = (String) headers.get(correlationIdKey);

I tried outHeader = exchange.getOut().getHeaders(), I got an empty map, and headers that I put in outHeader got propagated.

I expect that @OutHeader and exchange.getOut.getHeader() both must give an empty map rather then one giving null.

Is this a bug? or intended for some functionality.

Oops I could not submit screenshot image of debug session.

  • 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:10:07+00:00Added an answer on June 14, 2026 at 7:10 pm

    See this FAQ – http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

    And see the javadoc of the getOut() method on Exchange, then you would see that getOut will lazy create empty message if it was null. And therefore one is null and the other is an empty map, as the latter is due, getOut created an empty message.

    http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html

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

Sidebar

Related Questions

Tried to map it from Preferences -> Settings -> Keyboard, but the key combo
Tried with : IList<IList<string>> matrix = new List<new List<string>()>(); but I can't. How can
Tried to test Dialog with Spinner and got: NullPointerException: can't get shadow for null
Tried this: int idx4 = ppt.addMovie(new File(Animation.avi).getCanonicalPath(), MovieShape.MOVIE_AVI); MovieShape pict4 = new MovieShape(idx4, idx4);
tried using the following but it's not the solution controller: var list = new
Tried many ways based on other questions asked here but could not get a
Tried to create a SQL 2005 DB project. In Vs, New Project >> Sql
tried uncommenting pam_limits.so from the pam.d directory but no luck. Basic PAM seems to
Tried to create a mobile navigation using dataview or outline and the view renders
Tried searching the site, but cannot find an answer to my problem: Lets say

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.