<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Spring Community Forums - AMQP</title>
		<link>http://forum.springsource.org/</link>
		<description>Discussion on messaging with the AMQP protocol using the Spring AMQP project.</description>
		<language>en</language>
		<lastBuildDate>Sun, 19 May 2013 06:59:09 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forum.springsource.org/images/misc/rss.png</url>
			<title>Spring Community Forums - AMQP</title>
			<link>http://forum.springsource.org/</link>
		</image>
		<item>
			<title>SimpleContainer include multiple listener but only one consumer is vaild</title>
			<link>http://forum.springsource.org/showthread.php?137341-SimpleContainer-include-multiple-listener-but-only-one-consumer-is-vaild&amp;goto=newpost</link>
			<pubDate>Mon, 13 May 2013 06:31:32 GMT</pubDate>
			<description>hi,all. I configure multiple listener in a SimpleContainer ,but I found one  is valild 
here is  configure file 
 
Code: 
---------...</description>
			<content:encoded><![CDATA[<div>hi,all. I configure multiple listener in a SimpleContainer ,but I found one  is valild<br />
here is  configure file<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;rabbit:connection-factory id=&quot;connectionFactory&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=&quot;127.0.0.1&quot; channel-cache-size=&quot;25&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:queue name=&quot;DEMO.TEST&quot; durable=&quot;true&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:queue name=&quot;DEMO.TEST1&quot; durable=&quot;true&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:direct-exchange name=&quot;ex_direct&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; durable=&quot;true&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:bindings&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:binding queue=&quot;DEMO.TEST&quot; key=&quot;aaa&quot; &gt;&lt;/rabbit:binding&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:binding queue=&quot;DEMO.TEST1&quot; key=&quot;bbb&quot;&gt;&lt;/rabbit:binding&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/rabbit:bindings&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/rabbit:direct-exchange&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:template id=&quot;amqpTemplate&quot; connection-factory=&quot;connectionFactory&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exchange=&quot;ex_direct&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:admin connection-factory=&quot;connectionFactory&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;bean id=&quot;msghandler&quot; class=&quot;com.sinosoft.handler.MsgHandler&quot;&gt;&lt;/bean&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;bean id=&quot;msghandler1&quot; class=&quot;com.sinosoft.handler.MsgHandler1&quot;&gt;&lt;/bean&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:listener-container id=&quot;simplelsnr&quot; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  connection-factory=&quot;connectionFactory&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &lt;rabbit:listener id=&quot;lsnr0&quot; queues=&quot;DEMO.TEST&quot; ref=&quot;msghandler&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method=&quot;handleMessage&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;rabbit:listener id=&quot;lsnr1&quot;&nbsp; queues=&quot;DEMO.TEST1&quot; ref=&quot;msghandler1&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method=&quot;handleMessage&quot; /&gt; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/rabbit:listener-container&gt;</code><hr />
</div>now only msghandler1 is vaild ,I only receive message of &quot;DEMO.TEST1&quot; queue</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>zone</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?137341-SimpleContainer-include-multiple-listener-but-only-one-consumer-is-vaild</guid>
		</item>
		<item>
			<title>Start/stop consuming messages from queues using a single listener-container</title>
			<link>http://forum.springsource.org/showthread.php?137237-Start-stop-consuming-messages-from-queues-using-a-single-listener-container&amp;goto=newpost</link>
			<pubDate>Thu, 09 May 2013 20:34:12 GMT</pubDate>
			<description>My web-application is consuming messages sent by thousands of other publishing applications. Until now, I have had a single queue design; all...</description>
			<content:encoded><![CDATA[<div>My web-application is consuming messages sent by thousands of other publishing applications. Until now, I have had a single queue design; all publishing applications send messages to a single queue from where my application consumes them. But, I am now realizing the need for a multi-queue design; if a misbehaving application sends data extremely fast, messages from other applications may get stuck behind messages from the misbehaving application.<br />
<br />
I am trying to implement one-queue-per-publishing-application. I want to have a fixed number of inbound-adapters consuming messages from all these queues. Challenge is that these publishing applications get created/destroyed while my web-application is consuming messages. I want to be able to divide the queues available at start-up to the inbound-adapters and then add/remove queues from these adapters while they are consuming messages. What's the best way to accomplish this?</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>goyalk</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?137237-Start-stop-consuming-messages-from-queues-using-a-single-listener-container</guid>
		</item>
		<item>
			<title>How to use separate connections for sending and receiving data in Spring-AMQP?</title>
			<link>http://forum.springsource.org/showthread.php?137138-How-to-use-separate-connections-for-sending-and-receiving-data-in-Spring-AMQP&amp;goto=newpost</link>
			<pubDate>Tue, 07 May 2013 22:22:23 GMT</pubDate>
			<description>While exploring flow-control in RabbitMQ, I found this: 
  
“The intent here is to introduce a flow control mechanism that throttles producers but...</description>
			<content:encoded><![CDATA[<div>While exploring flow-control in RabbitMQ, I found this:<br />
 <br />
“The intent here is to introduce a flow control mechanism that throttles producers but lets consumers continue unaffected. However, since AMQP permits producers and consumers to operate on the same channel, and on different channels of a single connection, this logic is necessarily imperfect. In practice that does not pose any problems for most applications since the throttling is observable merely as a delay. Nevertheless, other design considerations permitting, it is advisable to only use individual AMQP connections for either producing or consuming.”<br />
 <br />
I am using Spring Integration in my web-application to send/receive data to/from RabbitMQ broker. I declare connection-factory, amqp-template, rabbit-admin, channels and inbound/outbound adapters using XML. What is the recommended way to ensure separate connections are used for sending and receiving? My observation is that by default, both sending and receiving are done on the same connection but on different channels.</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>goyalk</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?137138-How-to-use-separate-connections-for-sending-and-receiving-data-in-Spring-AMQP</guid>
		</item>
		<item>
			<title>Missing message ID for stateful retry operations</title>
			<link>http://forum.springsource.org/showthread.php?137082-Missing-message-ID-for-stateful-retry-operations&amp;goto=newpost</link>
			<pubDate>Mon, 06 May 2013 17:54:17 GMT</pubDate>
			<description><![CDATA[I'm trying to configure StatefulRetryOperationsInterceptorFactoryBean to simulate retry and dead letter queues as I have on a JMS implementation. But...]]></description>
			<content:encoded><![CDATA[<div>I'm trying to configure StatefulRetryOperationsInterceptorFactoryBean to simulate retry and dead letter queues as I have on a JMS implementation. But the retry is rasing a fatal exception due to the absence of the ID header.<br />
<br />
How do I add message Id header on my messages, backed by an Spring Integration amqp outbound channel?<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; &nbsp; &nbsp; &lt;int-amqp:outbound-channel-adapter channel=&quot;toRabbitJson&quot; amqp-template=&quot;amqpTemplate&quot; /&gt;</code><hr />
</div><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; &nbsp; &nbsp; &lt;bean id=&quot;retryOperationsInterceptor&quot; class=&quot;org.springframework.amqp.rabbit.config.StatefulRetryOperationsInterceptorFactoryBean&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;retryOperations&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bean class=&quot;org.springframework.retry.support.RetryTemplate&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;retryPolicy&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bean class=&quot;org.springframework.retry.policy.SimpleRetryPolicy&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;maxAttempts&quot; value=&quot;2&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/bean&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/bean&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;messageRecoverer&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bean class=&quot;org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/bean&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>marcio.gh</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?137082-Missing-message-ID-for-stateful-retry-operations</guid>
		</item>
		<item>
			<title>Spring Integration and Java Configuration</title>
			<link>http://forum.springsource.org/showthread.php?136885-Spring-Integration-and-Java-Configuration&amp;goto=newpost</link>
			<pubDate>Tue, 30 Apr 2013 04:18:01 GMT</pubDate>
			<description>I managed to get my spring integration working with xml config. I would now like to convert the xml config into its java equivalent. It seems like...</description>
			<content:encoded><![CDATA[<div>I managed to get my spring integration working with xml config. I would now like to convert the xml config into its java equivalent. It seems like spring-amqp supports this as they give the following example :<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">HTML Code:</div>
	<hr /><code class="bbcode_code">@Configuration<br />
public class RabbitConfiguration {<br />
<br />
&nbsp; @Bean<br />
&nbsp; public ConnectionFactory connectionFactory() {<br />
&nbsp; &nbsp; CachingConnectionFactory connectionFactory = new CachingConnectionFactory(&quot;localhost&quot;);<br />
&nbsp; &nbsp; return connectionFactory;<br />
&nbsp; }<br />
<br />
&nbsp; @Bean<br />
&nbsp; public AmqpAdmin amqpAdmin() {<br />
&nbsp; &nbsp; return new RabbitAdmin(connectionFactory());<br />
&nbsp; }<br />
<br />
&nbsp; @Bean<br />
&nbsp; public RabbitTemplate rabbitTemplate() {<br />
&nbsp; &nbsp; return new RabbitTemplate(connectionFactory());<br />
&nbsp; }<br />
<br />
&nbsp;  @Bean<br />
&nbsp;  public Queue myQueue() {<br />
&nbsp; &nbsp;  return new Queue(&quot;myqueue&quot;);<br />
&nbsp;  }<br />
&nbsp;}</code><hr />
</div>It would seam that Spring Integration is still dependent on xml configuration as the reference documentation for 3.0.0.M1 doesn't include Java Configuration examples.<br />
<br />
Undeterred I had a go at configurating it via java<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">HTML Code:</div>
	<hr /><code class="bbcode_code">**<br />
&nbsp;* AMQP Configuration<br />
&nbsp;*/<br />
@Configuration<br />
public class AmqpConfig {<br />
<br />
&nbsp; &nbsp; public static final int DEFAULT_REPLY_TIMEOUT = 5000;<br />
&nbsp; &nbsp; private static final String EXCHANGE_NAME = &quot;profile.manager.exchange&quot;;<br />
&nbsp; &nbsp; private static final String QUEUE_NAME = &quot;profile.manager.queue&quot;;<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public MessageChannel profileManagerRequestChannel() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; DirectChannel channel = new DirectChannel();<br />
&nbsp; &nbsp; &nbsp; &nbsp; return channel;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public MessageChannel profileManagerReplyChannel() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return new DirectChannel();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public MessageChannel profileManagerErrorChannel() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return new DirectChannel();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public ProfileManagerService profileManagerService() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return new ProfileManagerServiceImpl();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public JsonMessageConverter jsonMessageConverter() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return new JsonMessageConverter();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public GatewayProxyFactoryBean gatewayProxyFactoryBean() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; GatewayProxyFactoryBean gatewayProxyFactoryBean = new GatewayProxyFactoryBean();<br />
&nbsp; &nbsp; &nbsp; &nbsp; gatewayProxyFactoryBean.setServiceInterface(ProfileManagerClient.class);<br />
&nbsp; &nbsp; &nbsp; &nbsp; gatewayProxyFactoryBean.setDefaultRequestChannel(profileManagerRequestChannel());<br />
&nbsp; &nbsp; &nbsp; &nbsp; gatewayProxyFactoryBean.setDefaultReplyTimeout(DEFAULT_REPLY_TIMEOUT);<br />
&nbsp; &nbsp; &nbsp; &nbsp; return gatewayProxyFactoryBean;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public AmqpOutboundEndpoint outboundGateway() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; AmqpOutboundEndpoint outboundGateway = new AmqpOutboundEndpoint(rabbitTemplate());<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; //how do I sent the input<br />
&nbsp; &nbsp; &nbsp; &nbsp; outboundGateway.setExpectReply(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; outboundGateway.setExchangeName(EXCHANGE_NAME);<br />
&nbsp; &nbsp; &nbsp; &nbsp; outboundGateway.setRoutingKey(QUEUE_NAME);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return outboundGateway;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public AmqpInboundGateway inboundGateway() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; //AbstractMessageListenerContainer listenerContainer ???<br />
&nbsp; &nbsp; &nbsp; &nbsp; AmqpInboundGateway inboundGateway = new AmqpInboundGateway();<br />
&nbsp; &nbsp; &nbsp; &nbsp; inboundGateway.setRequestChannel(profileManagerReplyChannel());<br />
&nbsp; &nbsp; &nbsp; &nbsp; inboundGateway.setMessageConverter(jsonMessageConverter());<br />
&nbsp; &nbsp; &nbsp; &nbsp; inboundGateway.setErrorChannel(profileManagerErrorChannel());<br />
&nbsp; &nbsp; &nbsp; &nbsp; inboundGateway.setReplyTimeout(DEFAULT_REPLY_TIMEOUT);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return&nbsp; inboundGateway;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public ConnectionFactory rabbitConnectionFactory() {<br />
&nbsp; &nbsp; &nbsp;  return new CachingConnectionFactory();<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public RabbitTemplate rabbitTemplate() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; RabbitTemplate rabbitTemplate = new RabbitTemplate();<br />
&nbsp; &nbsp; &nbsp; &nbsp; rabbitTemplate.setConnectionFactory(rabbitConnectionFactory());<br />
&nbsp; &nbsp; &nbsp; &nbsp; rabbitTemplate.setMessageConverter(jsonMessageConverter());<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return rabbitTemplate;<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public AmqpAdmin amqpAdmin() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return new RabbitAdmin(rabbitConnectionFactory());<br />
&nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; @Bean<br />
&nbsp; &nbsp; public Queue profileManagerQueue() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return new Queue(QUEUE_NAME);<br />
&nbsp; &nbsp; }<br />
<br />
}</code><hr />
</div>To get this far I had to dig into the Namespace resolver code to work out the mappings between xml elements and classes. <br />
<br />
<br />
Its strange that there is an <b>AmqpInboundGateway</b> class but NO <b>AmqpOutboundGateway</b> - instead you create an <b>AmqpOutboundEndpoint</b> and the replyExpected flag causes it to behave as either an endpointAdapter or a gateway.<br />
<br />
The next thing that seems odd is that you cant specify the <b>requestChannel</b> for either the <b>AmqpInboundGateway</b> or <b>AmqpOutboundEndpoint</b> ??? <br />
<br />
When I try and create an <b>AmqpInboundGateway</b> the constructor wants a referenced to a <b>AbstractMessageListenerContainer</b> ????<br />
<br />
<br />
I guess I am not supposed to see these innards as they are hidden from me by the Xml configuration ? If you can advise me how to fix my attempt at configuring spring integration via Java Configuration that would be great. If its all too hard at the moment do you have an idea when spring integration will support Java Configuration ??<br />
<br />
I am trying to add spring integration into a production system and they are pretty keen to minimize the amount of xml configuration.<br />
<br />
Cheers</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>ZaphodB</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?136885-Spring-Integration-and-Java-Configuration</guid>
		</item>
		<item>
			<title>Spring Integration Asynchronize Gateway Exception callback Problem</title>
			<link>http://forum.springsource.org/showthread.php?136729-Spring-Integration-Asynchronize-Gateway-Exception-callback-Problem&amp;goto=newpost</link>
			<pubDate>Thu, 25 Apr 2013 10:40:26 GMT</pubDate>
			<description>Hi All, I have a spring Rabbitmq integration project.  
 
A system send request message to RabbitmqExchange then go to B system. This logic flow is...</description>
			<content:encoded><![CDATA[<div>Hi All, I have a spring Rabbitmq integration project. <br />
<br />
A system send request message to RabbitmqExchange then go to B system. This logic flow is using Asynchronize Gateway. Message from A's outboundGateway is able to reach B . B receive it will access to a server C then do the business job and then return the result msg back to A by using Asynchronize gateway config. [show in below diagram]<br />
<br />
Now, A send request --&gt; Rabbitmq --&gt; B, B access another system C but  throws a LoginException. I need B's exception return to A. How can I receive Exception from B which pass through rabbitmq(using async callback)?   ps. Without exception, A is able to get callback from B. <br />
<a href="http://forum.springsource.org/attachment.php?attachmentid=5598&amp;d=1366887873"  title="Name:  description.jpg
Views: 4
Size:  8.7 KB">description.jpg</a><br />
<br />
Anyone can help me ? : )</div>


	<div style="padding:10px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<ul>
			<li>
	<img class="inlineimg" src="http://forum.springsource.org/images/attach/jpg.gif" alt="File Type: jpg" />
	<a href="http://forum.springsource.org/attachment.php?attachmentid=5597&amp;d=1366885738">Show.jpg</a> 
(8.2 KB)
</li><li>
	<img class="inlineimg" src="http://forum.springsource.org/images/attach/jpg.gif" alt="File Type: jpg" />
	<a href="http://forum.springsource.org/attachment.php?attachmentid=5598&amp;d=1366887873">description.jpg</a> 
(8.7 KB)
</li>
			</ul>
			</fieldset>
	

	

	</div>
]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>ericaZ</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?136729-Spring-Integration-Asynchronize-Gateway-Exception-callback-Problem</guid>
		</item>
		<item>
			<title>Error queue retry</title>
			<link>http://forum.springsource.org/showthread.php?136725-Error-queue-retry&amp;goto=newpost</link>
			<pubDate>Thu, 25 Apr 2013 08:37:30 GMT</pubDate>
			<description><![CDATA[Hi, 
I'm using spring-rabbit in my message consumer. I've implemented a dead-letter exchange and queue system to collect any messages that could not...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I'm using spring-rabbit in my message consumer. I've implemented a dead-letter exchange and queue system to collect any messages that could not be processed. Please suggest me a good mechanism to re-queue the messages from dead-letter queue back to main queue after some time, so that it can try to process the message after some time.</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>tec</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?136725-Error-queue-retry</guid>
		</item>
		<item>
			<title>GatewayProxyFactoryBean and AMQP</title>
			<link>http://forum.springsource.org/showthread.php?136629-GatewayProxyFactoryBean-and-AMQP&amp;goto=newpost</link>
			<pubDate>Tue, 23 Apr 2013 07:37:19 GMT</pubDate>
			<description>Hi there, 
 
First off let me admit that I am pretty new to Spring Integration and AMQP so I apologize in advance if I am completely off track. 
 
I...</description>
			<content:encoded><![CDATA[<div>Hi there,<br />
<br />
First off let me admit that I am pretty new to Spring Integration and AMQP so I apologize in advance if I am completely off track.<br />
<br />
I am trying to get an example working using a GatewayProxyFactoryBean and AMQP. Here is an snippet from my spring configuration:<br />
<br />
-------<br />
<br />
	&lt;int:gateway id=&quot;gateway&quot;<br />
		service-interface=&quot;com.innovisionsystems.service.StringCon  versionService&quot;&gt;<br />
		&lt;int:method name=&quot;convertToUpperCase&quot; /&gt;<br />
	&lt;/int:gateway&gt;<br />
<br />
       &lt;int-amqp:outbound-gateway id=&quot;outboundGateway&quot;<br />
                           request-channel=&quot;toRabbit&quot;<br />
                           amqp-template=&quot;rabbitTemplate&quot;<br />
                           exchange-name=&quot;si.test.exchange&quot;/&gt;  <br />
<br />
-------<br />
<br />
As I understand it the GatewayProxyFactory bean will automatically create a temporary reply queue. When I step through my example in the debugger I can see the message arrive at the AmqpOutboundEndPoint::sendAndReceive() method with a replyChannel set.<br />
<br />
<br />
Here is an extract of the code:<br />
<br />
private Message&lt;?&gt; sendAndReceive(String exchangeName, String routingKey, Message&lt;?&gt; requestMessage) {<br />
		// TODO: add a convertSendAndReceive method that accepts a MessagePostProcessor so we can map headers?<br />
		Assert.isTrue(amqpTemplate instanceof RabbitTemplate, &quot;RabbitTemplate implementation is required for send and receive&quot;);<br />
		MessageConverter converter = ((RabbitTemplate) this.amqpTemplate).getMessageConverter();<br />
		MessageProperties amqpMessageProperties = new MessageProperties();<br />
		this.headerMapper.fromHeadersToRequest(requestMess  age.getHeaders(), amqpMessageProperties);<br />
		org.springframework.amqp.core.Message amqpMessage = converter.toMessage(requestMessage.getPayload(), amqpMessageProperties);<br />
		org.springframework.amqp.core.Message amqpReplyMessage = <b>this.amqpTemplate.sendAndReceive(exchangeName, routingKey, amqpMessage);</b><br />
		if (amqpReplyMessage == null) {<br />
			return null;<br />
		}<br />
<br />
By the time we get to the amqpTemplate.sendAndReceive() method call the amqpMessage does not appear to have any reply / replyChannel set.<br />
<br />
Is this expected behaviour ? Is there anyway for the temporary reply queue generated by the Gateway to be passed through AMQP ???<br />
<br />
<br />
Cheers</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>ZaphodB</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?136629-GatewayProxyFactoryBean-and-AMQP</guid>
		</item>
		<item>
			<title>stateful retry</title>
			<link>http://forum.springsource.org/showthread.php?136627-stateful-retry&amp;goto=newpost</link>
			<pubDate>Tue, 23 Apr 2013 07:26:44 GMT</pubDate>
			<description><![CDATA[my configuration looks like this. 
 
 
Code: 
--------- 
<bean id="myntraMessageKeyGenerator" class="x.y.MyntraMessageKeyGenerator"...]]></description>
			<content:encoded><![CDATA[<div>my configuration looks like this.<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;bean id=&quot;myntraMessageKeyGenerator&quot; class=&quot;x.y.MyntraMessageKeyGenerator&quot; init-method=&quot;init&quot; /&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &lt;bean id=&quot;retryInterceptor&quot; class=&quot;org.springframework.amqp.rabbit.config.StatefulRetryOperationsInterceptorFactoryBean&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;messageRecoverer&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bean class=&quot;x.y.DLQMessageRecoverer&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;messageKeyGenerator&quot; ref=&quot;myntraMessageKeyGenerator&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;retryOperations&quot; ref=&quot;retryTemplate&quot; /&gt;<br />
&nbsp; &nbsp; &lt;/bean&gt;&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &lt;bean id=&quot;retryTemplate&quot; class=&quot;org.springframework.retry.support.RetryTemplate&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;backOffPolicy&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bean class=&quot;org.springframework.retry.backoff.ExponentialBackOffPolicy&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;initialInterval&quot; value=&quot;5000&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;maxInterval&quot; value=&quot;120000&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;multiplier&quot; value=&quot;2&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/bean&gt;&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;retryPolicy&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bean class=&quot;org.springframework.retry.policy.SimpleRetryPolicy&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;maxAttempts&quot; value=&quot;3&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/bean&gt;&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/property&gt;<br />
&nbsp; &nbsp; &lt;/bean&gt;</code><hr />
</div>but i am getting below exception..<br />
<br />
Caused by: org.springframework.beans.factory.BeanCreationExce  ption: Error creating bean with name 'org.springframework.integration.amqp.outboun<br />
d.AmqpOutboundEndpoint#5d0ee8': Cannot resolve reference to bean 'retryInterceptor' while setting bean property 'adviceChain' with key [0]; nes<br />
ted exception is org.springframework.beans.factory.BeanCreationExce  ption: Error creating bean with name 'retryInterceptor' defined in ServletCo<br />
ntext resource [/WEB-INF/beans-messaging.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritableProperty<br />
Exception: Invalid property 'messageKeyGenerator' of bean class [org.springframework.amqp.rabbit.config.StatefulRet  ryOperationsInterceptorFacto<br />
ryBean]: Bean property 'messageKeyGenerator' is not writable or has an invalid setter method. Did you mean 'messageKeyGeneretor'?<br />
        at org.springframework.beans.factory.support.BeanDefi  nitionValueResolver.resolveReference(BeanDefinitio  nValueResolver.java:329)<br />
        at org.springframework.beans.factory.support.BeanDefi  nitionValueResolver.resolveValueIfNecessary(BeanDe  finitionValueResolver.java:107)<br />
        at org.springframework.beans.factory.support.BeanDefi  nitionValueResolver.resolveManagedList(BeanDefinit  ionValueResolver.java:353)<br />
        at org.springframework.beans.factory.support.BeanDefi  nitionValueResolver.resolveValueIfNecessary(BeanDe  finitionValueResolver.java:154)</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>raghukishoreb</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?136627-stateful-retry</guid>
		</item>
		<item>
			<title>Multiple RabbitAdmin instances force dubious declarations.</title>
			<link>http://forum.springsource.org/showthread.php?136475-Multiple-RabbitAdmin-instances-force-dubious-declarations&amp;goto=newpost</link>
			<pubDate>Fri, 19 Apr 2013 13:38:06 GMT</pubDate>
			<description><![CDATA[Hi Guys, 
 
I'm a little confused on the queue declaration policy for spring rabbit dist of amqp. Documentation suggests following  
 
2.12.1...]]></description>
			<content:encoded><![CDATA[<div>Hi Guys,<br />
<br />
I'm a little confused on the queue declaration policy for spring rabbit dist of amqp. Documentation suggests following <br />
<br />
2.12.1 Automatic Declaration of Exchanges, Queues and Bindings<br />
<br />
The RabbitAdmin component can declare exchanges, queues and bindings on startup. It does this lazily, through a ConnectionListener, so if the broker is not present on startup it doesn't matter. The first time a Connection is used (e.g. by sending a message) the listener will fire and the admin features will be applied. A further benefit of doing the auto declarations in a listener is that if the connection is dropped for any reason (e.g. broker death, network glitch, etc.) they will be applied again the next time they are needed.<br />
<br />
However, currently there is no mechanism for assigning a queue to a particular connection factory, so if I wanted to declare a queue on a particular broker with RabbitAdmin, it is currently not possible. <br />
<br />
The code at fault imo is the following :- <br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">final Collection&lt;Exchange&gt; exchanges = applicationContext.getBeansOfType(Exchange.class).values();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; final Collection&lt;Queue&gt; queues = applicationContext.getBeansOfType(Queue.class).values();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; final Collection&lt;Binding&gt; bindings = applicationContext.getBeansOfType(Binding.class).values();<br />
<br />
... <br />
<br />
rabbitTemplate.execute(new ChannelCallback&lt;Object&gt;() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public Object doInRabbit(Channel channel) throws Exception {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; declareExchanges(channel, exchanges.toArray(new Exchange[exchanges.size()]));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; declareQueues(channel, queues.toArray(new Queue[queues.size()]));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; declareBindings(channel, bindings.toArray(new Binding[bindings.size()]));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });</code><hr />
</div>Which obviously is indiscriminate in its effort to create bindings. <br />
<br />
Are there any plans to fix this or any workaround ? <br />
<br />
Cheers, <br />
Mike.</div>

]]></content:encoded>
			<category domain="http://forum.springsource.org/forumdisplay.php?74-AMQP">AMQP</category>
			<dc:creator>patelm5</dc:creator>
			<guid isPermaLink="true">http://forum.springsource.org/showthread.php?136475-Multiple-RabbitAdmin-instances-force-dubious-declarations</guid>
		</item>
	</channel>
</rss>
