08
grudnia
2010
|
JMS seems like a hostile ground. It has all it's quirks and strange behaviours. A couple of defining standards plus esoteric brokers, queues and topics. |
![]() |
At work, we mainly use open source Jms solutions, namely Apache ActiveMQ. This one is usually bundled with Apache Servicemix, as a message broker for this particular ESB. As there are some minor caveats in this scennerio, I'd like to describe here some guidelines for getting to running JMS queues.
Treat this post as a quick cheat sheet with the most common things about JMS I tend to forget :)
Minor glitches encountered during work with embedded broker led to some thoughts about switching to external broker. This is how I configure SMX and AcviteMQ.
Necessary steps:
]]> 105 1235
BrokerService broker = new org.apache.activemq.broker.BrokerService();
broker.setBrokerName("AMQ-1");
broker.addConnector("tcp://localhost:51616");
broker.setPersistent(false);
broker.start();
Notice it has persistance disabled.
ctx.removeComponent("jms");
ctx.addComponent("jms", ActiveMQComponent.activeMQComponent("tcp://localhost:51616"));
private JmsEndpoint createJmsEndpoint(String endpoint) throws JMSException {
ActiveMQComponent amqc = (ActiveMQComponent) ctx.getComponent("jms");
JmsEndpoint endp = JmsEndpoint.newInstance(new ActiveMQTopic(endpoint), amqc);
return endp;
}
createJmsEndpoint("ESB/XYZ")
21 kwietnia 2010, 18:01:59 | Reaktywacja o-filmoramy? |
Mam nadzieję, że wreszcie jednak ruszę z blogiem filmowym, po raz kolejny należy mu się reaktywacja.
http://o-filmorama.blogspot.com