Understanding how BreadcrumbId is generated

Viewed 799

I was wondering how BreadcrumbId is generated?

I'm testing this with AMQ and Camel.

I've POSTed a message to queue1 using the REST API and this generates a message with messageId value "X".

I've then tested the following very simple routes consuming from one queue and sending to another.

queue1 --> queue2
queue2 --> queue3
queue3 --> queue4
queue4 --> queue5

A breadcrumbId is generated in the first route with value "X".

In each route each message gets a new MessageId as per the JMS spec but the breadcrumbId remains the same.

The word "breadcrumb" gives me the impression it should change each route/exchange to allow you to trace back through the messages?

But it seems to be the MessageId of the very first message?

I can't find a description of how it is actually generated.....

Thanks

1 Answers

From Camel doc

breadcrumbId - An unique id used for tracking messages across transports

I think the value for the message is generated during the first camel processing from MessageId, and then the existing one is used.

Related