mbknor / dropwizard-activemq-bundle Goto Github PK
View Code? Open in Web Editor NEWUse it when you need to send and receive JSON via ActiveMQ in your Dropwizard application
License: Other
Use it when you need to send and receive JSON via ActiveMQ in your Dropwizard application
License: Other
Morten,
Can you please specify some licensing details for this project. I would like to use it in my project.
Thanks,
Michał
Do you think is new PR with support for configuration redelivery policies map worth including?
If yes, I'll try to cut some polished PR from my current work in progress. It'll be great.
ActiveMQConfigRedeliveryPolicy - has reasonable properties (taken from: http://activemq.apache.org/redelivery-policy.html)
Example of configuration taken from my real use case:
...
activeMQConfig:
...
redeliveryPolicies:
mainQueue:
initialRedeliveryDelay: 5000
redeliveryDelay: 10000
maximumRedeliveries: 2
tryQueue:
initialRedeliveryDelay: 60000
redeliveryDelay: 60000
maximumRedeliveries: 5
ActiveMQBundle core modification:
for (String name : activeMQConfig.redeliveryPolicies.keySet()) {
String destinationName = DestinationCreatorImpl.provideDestinationName(name);
ActiveMQDestination destination = DestinationCreatorImpl.isQueue(name) ?
new ActiveMQQueue(destinationName) : new ActiveMQTopic(destinationName);
final RedeliveryPolicy redeliveryPolicy = activeMQConfig.redeliveryPolicies.get(name).create();
realConnectionFactory.getRedeliveryPolicyMap().put(destination, redeliveryPolicy);
}
ActiveMQConfig change:
@JsonProperty
@Valid
public Map<String, ActiveMQConfigRedeliveryPolicy> redeliveryPolicies = Maps.newHashMap();
Rest of small changes are in my fork: https://github.com/mlotysz/dropwizard-activemq-bundle/commit/533623a48e7abdb317bf708660cd0ecdf13236b5
Hey, Thanks for this project.
I am a newbie trying activeMQ with dropwizard.
I am using eclipse.
I have downloaded your zip file and using that.
But I do not know how to run this.
I do not see any file with main function.
Do I need to configure a few things extra ? Am I missing something ?
Thanks!
Alok
I cannot create a durable subscription on a topic. Can this be added?
Sorry if the question is meaningless, I'm a newbie in activeMq...
In MQReceiver, why did you implement a loop on messageConsumer's receive method instead of using a MessageListener ?
Thanks and congratulation for your work.
The maven repo mentioned in the readme:
https://raw.githubusercontent.com/mbknor/mbknor.github.com/master/m2repo/releases
Is now throwing a 404.
Has it been moved elsewhere? Any plans to host on central?
Is there a way to connect to multiple activemq brokers in a single application?
The dropwizard-activemq-bundle is not usable when running with Java 7. The following error
is logged: Unsupported major.minor version 52.0
Is Java 7 supported or only Java 8?
I am quite a newbee in this space. So excuse me if my question sounds too vague or naive. But just wanted to understand do we need to do any kind of config or changes in the code to make it support a MQ in clustered mode? Currently we are using ZeroMQ in our project. And it is written only to support single instance peer and requires good amount of code changes to support clustering. Please let me know your thought on this.
Let me know if we need to discuss this over skype.
Thanks,
Vikesh
If the exceptionHandler is failing, we are not acking the message, nor waiting some time before retrying. This results in 100% CPU loop (re)processing the same message and failing every time.
Need to have special handling of this situation, and possibly add slowdown
Hi,
In my very simple test scenario I am using a failover transport layer for the client URI. This URI does not have a maxReconnectAttempts set so will block until it can get a connection.
When there are no brokers up this means the healthcheck API blocks indefinitely.
The URI could be changed to include a maxreconnect (i.e., maxReconnectAttempts=X), but that will affect actual production clients where blocking until we have a connection is a desired behaviour.
Is there any way to prevent the healthcheck from blocking?
Since it appears that 'Uncaught exception - will try to recover' - 'javax.jms.IllegalStateException: The Consumer is closed' is happening from time to time, we should not log it as such verbose ERROR
ERROR [2014-05-06 12:17:59,657] com.kjetland.dropwizard.activemq.ActiveMQReceiverHandler: Uncaught exception - will try to recover
! javax.jms.IllegalStateException: The Consumer is closed
! at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:836) ~[activemq-client-5.9.0.jar:5.9.0]
! at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:593) ~[activemq-client-5.9.0.jar:5.9.0]
! at org.apache.activemq.jms.pool.PooledMessageConsumer.receive(PooledMessageConsumer.java:67) ~[activemq-jms-pool-5.9.0.jar:5.9.0]
! at com.kjetland.dropwizard.activemq.ActiveMQReceiverHandler.runReceiveLoop(ActiveMQReceiverHandler.java:169) ~[dropwizard-activemq-0.3.5.jar:na]
! at com.kjetland.dropwizard.activemq.ActiveMQReceiverHandler.run(ActiveMQReceiverHandler.java:137) ~[dropwizard-activemq-0.3.5.jar:na]
! at java.lang.Thread.run(Thread.java:744) [na:1.8.0]
INFO [2014-05-06 12:17:59,657] com.kjetland.dropwizard.activemq.ActiveMQReceiverHandler: Setting up receiver for Consumer.x.VirtualTopic.request.v1
INFO [2014-05-06 12:17:59,681] com.kjetland.dropwizard.activemq.ActiveMQReceiverHandler: Started listening for messages on Consumer.x.VirtualTopic.request.v1
Hi there,
I am trying to see if there is a way to access the message properties when consuming a message from the queue. I've dug into the source code a bit and it looks like only the message body is accessible from the receiver.
Is there something I am missing? Let me know and thank you so much!
Cheers,
Teresa
Hello, why not to upgrade to Dropwizard 1.3.7 and ActiveMQ 5.15.8
Thanks.
I see that ActiveMQBundle is a ConfiguredBundle. This means that we cannot use multiple ActiveMQBundle's in the same application.
I need to connect to multiple different ActiveMQ endpoints in my application. Can you suggest a way to do that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.