Skip to content

Instantly share code, notes, and snippets.

@jsmucr
Last active March 2, 2018 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsmucr/c64bf771603c9c274efce8cb77f7f752 to your computer and use it in GitHub Desktop.
Save jsmucr/c64bf771603c9c274efce8cb77f7f752 to your computer and use it in GitHub Desktop.
Apache Artemis thoughts

Intro

This file is meant to collect all my findings about the Apache ActiveMQ Artemis message queueing system. Although the framework documentation seems to be huge, it does not cover many situations anyone can get into while trying to adopt the technology.

I like to use Groovy along with the Core API.

Static discovery connection URL for multiple servers

Just separate the URLs with a hashmark:

tcp://10.0.0.2:61616#tcp://10.0.0.3:61616

This will get handy when you can't or don't want to use the UDP discovery and/or the JMS API. Usage with the Core API:

def locator = ActiveMQClient.createServerLocator('tcp://10.0.0.2:61616#tcp://10.0.0.3:61616')

But you may want to combine this with high availability setting (without it, the offline servers would be skipped only upon the initial connection, not in case of failure):

tcp://10.0.0.2:61616?ha=true#tcp://10.0.0.3:61616?ha=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment