Wildfly is a great platform and can do REST web-services (although I'm not terribly familiar with that functionality). Furthermore, it has native support for embedded Artemis which could make things easier for you to deploy and manager. Wildfly doesn't integrate the latest and greatest Artemis version (i.e. 2.x) so if you want to be 100% up-to-date on the message broker side of things then you might consider a standalone Artemis deployment. That said, the version of Artemis that Wildfly integrates (i.e. 1.5.x) will support your use-case without any issues.
I'm pretty sure Artemis has been integrated with TomEE, but I don't have any personal experience with it.
Depending on your functional requirements you might could potentially simplify your solution by eliminating one of the broker instances and either sending messages directly to the remote broker from your web service or inserting data into MongoDB directly from the remote message consumer. It's not clear to me why you would necessarily need 2 brokers. I assume there's details of your use-case which you haven't provided.
As per your statement " simplify your solution by eliminating one of the
broker instances and either sending messages directly to the remote broker
from your web service" , I should have one remote broker , what do you
mean by that?
(Will discuss in HornetQ parlance to keep it simple as i thinks concept
will be same for ActiveMQ or others)
1: only one HornetQ server placed on the remote machine B and NO
HornetQ server on local machine A, then create a producer by creating
session object using a lookup of remote Queue on machine
Destination destination = (Destination) jndi.lookup("MyRemoteQueueOnMachineB");
MessageProducer producer = session.createProducer(destination);
(I was thinking session ,producer and Queue objects will be separate for
respective machines A and B)
I am trying these scenario,if it works will let you know.
I'm not sure if you're asking a question here or just making a statement. Are you currently facing a particular problem? Please clarify.