{"action":"closed","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/96","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/96/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-sleuth/issues/96/events","html_url":"https://github.com/spring-cloud/spring-cloud-sleuth/issues/96","id":125242851,"number":96,"title":"Spring Sleuth Correlating Messages","user":{"login":"englishbreeze","id":16581276,"avatar_url":"https://avatars.githubusercontent.com/u/16581276?v=3","gravatar_id":"","url":"https://api.github.com/users/englishbreeze","html_url":"https://github.com/englishbreeze","followers_url":"https://api.github.com/users/englishbreeze/followers","following_url":"https://api.github.com/users/englishbreeze/following{/other_user}","gists_url":"https://api.github.com/users/englishbreeze/gists{/gist_id}","starred_url":"https://api.github.com/users/englishbreeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/englishbreeze/subscriptions","organizations_url":"https://api.github.com/users/englishbreeze/orgs","repos_url":"https://api.github.com/users/englishbreeze/repos","events_url":"https://api.github.com/users/englishbreeze/events{/privacy}","received_events_url":"https://api.github.com/users/englishbreeze/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-06T19:21:01Z","updated_at":"2016-01-07T18:42:06Z","closed_at":"2016-01-07T18:42:06Z","body":"Hi,\r\n I have a service that sends messages to another service and would like to correlate them together. The problem is that Spring Sleuth does not correlate the two services together (i.e. Set the parent trace id of the receiver to the trace id of the sender) I'm using Spring Integration MessageChannel to send message from one service to another. Here is my channel configuration for the outbound channel:\r\n\r\n        @Bean\r\n\t@ServiceActivator(inputChannel = \"amqpOutboundChannel\")\r\n\tpublic AmqpOutboundEndpoint amqpOutbound(AmqpTemplate amqpTemplate) {\r\n\t\tAmqpOutboundEndpoint outbound = new AmqpOutboundEndpoint(amqpTemplate);\r\n\t\toutbound.setRoutingKey(\"myQueue\"); // default exchange - route to queue\r\n\t\t\t\t\t\t\t\t\t\t// 'foo'\r\n\t\treturn outbound;\r\n\t}\r\n\r\n\t@Bean\r\n\tpublic MessageChannel amqpOutboundChannel() {\r\n\t\treturn new DirectChannel();\r\n\t}\r\nsending the Message using this code:\r\nMessagingTemplate template = new MessagingTemplate();\r\ntemplate.send(channel, new GenericMessage<String>(\"blahblah\"));\r\n\r\nHere is my channel configuration for the input channel:\r\n\r\n        @Bean\r\n\tpublic MessageChannel amqpInputChannel() {\r\n\t\treturn new DirectChannel();\r\n\t}\r\n\r\n\t@Bean\r\n\tpublic AmqpInboundChannelAdapter inbound(SimpleMessageListenerContainer listenerContainer,\r\n\t\t\t@Qualifier(\"amqpInputChannel\") MessageChannel channel) {\r\n\t\tAmqpInboundChannelAdapter adapter = new AmqpInboundChannelAdapter(listenerContainer);\r\n\t\tadapter.setOutputChannel(channel);\r\n\t\treturn adapter;\r\n\t}\r\n\r\n\t@Bean\r\n\tpublic SimpleMessageListenerContainer container(ConnectionFactory connectionFactory) {\r\n\t\tSimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory);\r\n\t\tcontainer.setQueueNames(\"myQueue\");\r\n\t\t// ...\r\n\t\treturn container;\r\n\t}\r\n\r\n\t@Bean\r\n\t@ServiceActivator(inputChannel = \"amqpInputChannel\")\r\n\tpublic MessageHandler handler() {\r\n\t\treturn new MessageHandler() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void handleMessage(Message<?> message) throws MessagingException {\r\n\t\t\t\tSystem.out.println(message.getPayload());\r\n\t\t\t}\r\n\r\n\t\t};\r\n\r\nCan you guys let me know how I'm suppose to correlate the two services using Messaging?\r\n "}}