You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Tim Bain <tb...@alumni.duke.edu> on 2017/11/20 06:30:06 UTC

Re: How to implement event auditing with guava eventbus and activemq

ActiveMQ is not a database, and attempting to use it as one will probably
result in poor performance. ActiveMQ is meant to be a means of transferring
messages from producer to consumer, and it's optimized for the case where
messages are consumed shortly after they're produced. If you try to consume
the messages much later, you risk performance problems (e.g. KahaDB won't
be able to delete the files that contain old messages if those files
contain even one of your auditing messages). JMS brokers such as ActiveMQ
also don't allow random access to their data; JMS messages are consumed in
order once and only once, which might not be the ideal access pattern for
evaluating audit data.

I think you'd be much better of using an RDBMS or a NoSQL database for your
use case rather than a message bus such as ActiveMQ.

Tim

On Wed, Oct 25, 2017 at 3:39 AM, pragmaticjdev <am...@gmail.com> wrote:

> In our application we use guava eventbus along with activemq to implement
> event based requirements between two web applications. Events are being
> published and subscribed by different components of thw two web
> applications. For receiving a message published by a component of a
> different web application a javax.jms.MessageListener is registered on
> startup that calls guava's eventbus.post(). Guava's event bus is used to
> decouple different components and activemq mainly acts as a distributed
> message broker for inter web application communication.
>
> We need to enhance this framework to support event auditing. This could
> include
>
> 1. Maintaining a history of which feature/component triggered the event
> 2. What event was triggered (there could be multiple events that a
> component
> could trigger)
> 3. When was the event triggered
> 4. Which components (consumers) subscribed to it
> 5. What action(s) was performed
> 6. When did the action(s) complete.
>
> Note that there could be a chain of events. An event triggered by component
> A being acted upon by an action in component B. Subsequently on completion
> of the action, component B creates an event that triggers an action in
> component C.
>
> We need to create a UI that displays the above event auditing details. I
> would like to get expert inputs on how could this be implemented by
> extending the current usage/configuration of guava event bus and activmq.
>
> I understand that activemq does support persistence but some open questions
> are
>
> 1. Can the above details be captured and persisted asynchronously in
> activemq?
> 2. Can the messages (events) be retrieved back from activemq to build up a
> UI that I mentioned above?
> 3. Would persisting the event in a RDBMS be better (more structured?) then
> persisting them through activemq? Would the performance be drastically
> different between database persistence and activemq?
> 4. Is activemq used for such event auditing use cases? Are there any
> constraints/limitations that we need to be aware off?
>
> Thanks.
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>