This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
No announcement yet.
spring config/channel error/error handlerPage Title Module
I would say probably the former, since the implementation is near to final release, but if there are really problems then we'd like to get more detailed feedback now (e.g. a stack trace on that error). Can you post your configuration? Still looks to me like you have another consumer process running somewhere. It works pretty seamlessly for others, and I don't think there is such a big learning curve if you are au fait with messaging in general. Most people say how easy it is to set up compared to ActiveMQ, so the contrast is interesting.
I can see immediately that you have 2 consumers on the queue.trades queue (one <rabbit:listener-container/> and one <amqp:inbound-channel-adapter/>), so that explains that observation. I'm not quite sure what you expect the Spring Integration pieces to do, since there are no endpoints attached to the TradeChannel (in this snippet at least), and the <amqp:outbound-channel-adapter channel=""/> is connected to nothing (I don't even know why that's legal). Maybe you don't need any of the Spring Integration pieces at all for your use case?
P.S. don't use SingleConnectionFactory - the docs are quite clear about that, I hope.
Thanks for the response. The only reason that I tried the integration was because I kept getting the unknown channel errors, everything was working fine but they were just annoying. I am still unclear what the spring integration piece is for? And what the channels are for then. It seems like the channels are for threading but I would think there would be a default channel. Obviously I am missing something major...
I would recommend reading the Spring Integration user guide if you are interested in that piece. You don't need it to use Spring AMQP, but some people find it useful, so that's why there is that spring-integration-amqp module for adapting Spring AMQP to the Spring Integration model. There's a close parallel with JMS there.
Spring Integration has a MessageChannel interface and AMQP has a Channel (clash of domain terminology, not related), so maybe that has caused some confusion in your case? "Unknown Channel" is what the AMQP broker will send you as an error message if you try and ack a message on a Channel that is closed (for instance). Why it would be closed is an open question, and it could happen for any number of reasons, like your network connection going down for instance. It wouldn't happen on a sunny day, though, and if you use a CachingConnectionFactory you might even find that it reconnects more cleanly.
I am getting the following error:
15:40:38 ERROR [TopicProducer] java.lang.IllegalAccessError: tried to access method com.rabbitmq.client.impl.AMQBasicProperties.<init> ()V from class org.springframework.amqp.rabbit.support.DefaultMes sagePropertiesConverter
I do not see anything in the spring doc about message properties so I am stuck
I thought it was a version issue and have tried the newest release (1.0.0.RC2) and 1.0.0.BUILD-SNAPSHOT. I am at a loss as to how to proceed.
I think you have an older version of spring-rabbit on your classpath (maybe the snapshot is mouldy?). We haven't used BasicProperties() since before RC2 (see JIRA AMQP-175) because it was made private and replaced by a Builder pattern in the Rabbit Java client version 2.5.0.
I was thinking this yesterday. Should I even use spring-rabbit? If so which version? I tried to removed the spring-rabbit dependency but it also seems to remove the amqp-client-2.5.0.jar. I cannot seem to isolate it.