I plan to have a broker topic and have multiple default message listeners or simple message listeners. All the listeners execute the same code.
- Is each listener code execution independent of another. What I am trying to ask is, if there will be a conflict among listeners when accessing the same methods ?
I kind of what them to work like a multi threaded execution. I am using JMS and activemq as broker.
Some code to understand : Each listener will call this method "event processing" sending the event. This method will in turn call other methods. The handle method will in turn call other methods.
private void eventProcessing(final Event Event){
try {
if(Event.isDatafileTransaction()){
final EventDatafileTransaction datafileTransaction = Event.getDatafileTransaction();
final List<Events> transactions = getDatafileTransactions(datafileTransaction);
final List<AcEventRecordOperation> recordOperations = getTransactionsAsListOfRecordOperations(datafileTransaction, transactions);
if (recordOperations != null && recordOperations.size() > 0) {
recordOperationListener.handle(recordOperations);
}
}
} catch (Throwable t) {
}
}