Schaffer
Schaffer

Reputation: 315

Good examples of Artemis core API usage

I'm building an application using Artemis (2.13.0) core API, which I'm new to. I'm familiar with JMS although it's been a few years. I've decided to use the core API after discovering some of the JMS APIs seem to be deprecated, and I read somewhere that there is a preference to use the core APIs. I've built a very basic application using the few examples I can find in the documentation. This includes the synchronous producer and client example in the one program.

Can someone please point me to more comprehensive core API examples and recommended guidelines/practices, especially receiving messages asynchronously. All I can find are the JMS examples most of which recommend using deprecated API calls.

Upvotes: 0

Views: 792

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 35008

As far as I'm aware none of the examples shipped with ActiveMQ Artemis use deprecated APIs, JMS or otherwise. If they do they can & should be fixed.

The Artemis JMS client is essentially a wrapper around the core client. However, I would opt for a standard API (e.g. JMS) or protocol (e.g. AMQP, STOMP, etc.) rather than the core API as the core API is specific to ActiveMQ Artemis. The core client API essentially exists to facilitate the implementation of the JMS client as well as broker-specific tasks like clustering and bridging.

You can achieve finer grained control and slightly better performance working directly with the core API, but you'll sacrifice application portability.

The best source of core API examples would probably be in the ActiveMQ Artemis test-suite itself (e.g. in the integration section), although it's not exactly meant to serve documentation purposes. Aside from that there's the JavaDoc.

Upvotes: 1

Related Questions