GigaSpaces Online Help
One of the benefits of the virtualization approach provided by GigaSpaces EAG is that this question becomes less strategic, but is now merely tactical.
This relies on the fact that a user can interact with the same messaging runtime using both API's at any time. In fact, in many cases it makes sense to combine the two approaches under the same application. A typical scenario could be in cases where an application uses the JavaSpaces API for its internal messaging bus and JMS as the standard interface for integration with external applications.
Since there is some level of overlap between the functionality provided by the JavaSpaces API and the JMS API, it is important to understand when to use each of them. We will try to answer this question by providing a list of scenarios in which one of these technologies is superior to the other.
As a general rule, JavaSpaces would be a better fit in the following workflow and parallel processing scenarios:
Many-to-Many relationships - Exchanges, Trading, Soft switches
Content-based routing
Workflow - state machine
Inter application integration - integration among services
JMS would better fit into the following scenarios:
Reliable point to point communication
Integration between two separate applications
Durable subscribers