Skip to content

EVENT-51: Remove ActiveMQ/JMS and replace with in-memory Spring event dispatch#25

Open
wikumChamith wants to merge 3 commits intoopenmrs:masterfrom
wikumChamith:EVNT-51
Open

EVENT-51: Remove ActiveMQ/JMS and replace with in-memory Spring event dispatch#25
wikumChamith wants to merge 3 commits intoopenmrs:masterfrom
wikumChamith:EVNT-51

Conversation

@wikumChamith
Copy link
Copy Markdown
Member

@wikumChamith wikumChamith commented Apr 13, 2026

Replaces the embedded ActiveMQ broker and JMS topic/subscriber machinery with a simple in-memory ConcurrentHashMap<String, Set> registry. Events are now dispatched synchronously via EventListener.onEvent(OpenMrsEntityEvent) instead of through JMS MapMessage.

  • Removes activemq-core and spring-jms dependencies
  • Deletes JmsEventPublisher; adds EventPublisher extending TransactionEventListener
  • Rewrites EventEngine as an in-memory pub/sub registry
  • Replaces EventListener extends javax.jms.MessageListener with EventListener.onEvent(OpenMrsEntityEvent)
  • Drops Destination-based API from Event facade (getDestination, getDestinationFor, shutdown)

Tlcket: https://openmrs.atlassian.net/browse/EVNT-51

… dispatch

  Replaces the embedded ActiveMQ broker and JMS topic/subscriber machinery with a simple in-memory ConcurrentHashMap<String, Set<EventListener>>
  registry. Events are now dispatched synchronously via EventListener.onEvent(OpenMrsEntityEvent) instead of through JMS MapMessage.

  - Removes activemq-core and spring-jms dependencies
  - Deletes JmsEventPublisher; adds EventPublisher extending TransactionEventListener
  - Rewrites EventEngine as an in-memory pub/sub registry
  - Replaces EventListener extends javax.jms.MessageListener with EventListener.onEvent(OpenMrsEntityEvent)
  - Drops Destination-based API from Event facade (getDestination, getDestinationFor, shutdown)
@dkayiwa
Copy link
Copy Markdown
Member

dkayiwa commented Apr 13, 2026

@wikumChamith did you ask claude to review this?

@ibacher
Copy link
Copy Markdown
Member

ibacher commented Apr 13, 2026

I was going to comment on this, but my question is: if we move everything to Spring Application Events, do we even need something that listeners register with, etc.? I.e., don't we just get that for free?

… dispatch

  Replaces the embedded ActiveMQ broker and JMS topic/subscriber machinery with a simple in-memory ConcurrentHashMap<String, Set<EventListener>>
  registry. Events are now dispatched synchronously via EventListener.onEvent(OpenMrsEntityEvent) instead of through JMS MapMessage.

  - Removes activemq-core and spring-jms dependencies
  - Deletes JmsEventPublisher; adds EventPublisher extending TransactionEventListener
  - Rewrites EventEngine as an in-memory pub/sub registry
  - Replaces EventListener extends javax.jms.MessageListener with EventListener.onEvent(OpenMrsEntityEvent)
  - Drops Destination-based API from Event facade (getDestination, getDestinationFor, shutdown)
… dispatch

  Replaces the embedded ActiveMQ broker and JMS topic/subscriber machinery with a simple in-memory ConcurrentHashMap<String, Set<EventListener>>
  registry. Events are now dispatched synchronously via EventListener.onEvent(OpenMrsEntityEvent) instead of through JMS MapMessage.

  - Removes activemq-core and spring-jms dependencies
  - Deletes JmsEventPublisher; adds EventPublisher extending TransactionEventListener
  - Rewrites EventEngine as an in-memory pub/sub registry
  - Replaces EventListener extends javax.jms.MessageListener with EventListener.onEvent(OpenMrsEntityEvent)
  - Drops Destination-based API from Event facade (getDestination, getDestinationFor, shutdown)
@wikumChamith
Copy link
Copy Markdown
Member Author

I was going to comment on this, but my question is: if we move everything to Spring Application Events, do we even need something that listeners register with, etc.? I.e., don't we just get that for free?

Good call. I tried to follow the structure in the old one looks like we don't need it. I updated the PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants