简体   繁体   中英

Spring Integration queue: Where does the queue resides?

I am new to Spring integration;If i understand right, spring integration has 3 key players;

1 Publisher

2 Subscriber

3 Channel.

I can understand the Publisher, subscriber frameworks where DB/File system is used as queue. Where does spring integration queue resides? If publisher and subscriber are individual process by itself, how do they share channel? Is channel accessible to both Publisher process and subscriber process because they run in same JVM?

Does that mean that, if publisher runs in one machine and subscriber runs in another machine, can't we use Spring integration?

The Spring Integration is Framework for developing integration solutions. It is lightweight and doesn't provide a Broker solution.

If your producer and consumer are in separate JVMs, you really have to use third-party Messaging Broker like ActiveMQ, RabbitMQ, Apache Kafka, Hazelcast etc.

Spring Integration just only provides building blocks, everything rest is up to use. The main feature of the channel that you always can switch it into different implementations without impacting producer and consumer. Right, if both producer and consumer are in the same JVM, there is no reason in the external network communication. In most cases you even don't need to use QueueChannel - the DirectChannel is enough to perform consuming in the producer's thread.

See Message Channels for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM