[
https://issues.apache.org/jira/browse/ARTEMIS-5875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18060902#comment-18060902
]
Zhengtao Zhong edited comment on ARTEMIS-5875 at 2/25/26 4:02 AM:
------------------------------------------------------------------
[~jbertram]
What is P2P model
P2P, as the name suggests, is a one-to-one message sending and receiving model,
that is, there is only one message sender and one message receiver. The Pub/Sub
mode is usually used in one-to-many or many-to-many mass messaging scenarios,
that is, scenarios with one or more message senders and multiple message
receivers.
In the P2P model, the sender has already made clear the intended recipient
information of the message when sending the message, and makes it clear that
the message only needs to be consumed by a specific single client. When the
sender sends a message, he directly specifies the receiver through the Topic
information, and the receiver can obtain the message without subscribing in
advance.
The P2P model not only saves recipients the cost of registering a subscription
relationship, but also reduces push delays because the links for sending and
receiving messages are individually optimized.
see
[P2pAutoSubscribePlugin|https://github.com/jsbxyyx/apache-artemis-plugin/blob/main/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/P2pAutoSubscribePlugin.java]
see
[mqtt-auto-subscription|https://docs.emqx.com/en/emqx/latest/messaging/mqtt-auto-subscription.html]
was (Author: JIRAUSER302940):
[~jbertram]
What is P2P model
P2P, as the name suggests, is a one-to-one message sending and receiving model,
that is, there is only one message sender and one message receiver. The Pub/Sub
mode is usually used in one-to-many or many-to-many mass messaging scenarios,
that is, scenarios with one or more message senders and multiple message
receivers.
In the P2P model, the sender has already made clear the intended recipient
information of the message when sending the message, and makes it clear that
the message only needs to be consumed by a specific single client. When the
sender sends a message, he directly specifies the receiver through the Topic
information, and the receiver can obtain the message without subscribing in
advance.
The P2P model not only saves recipients the cost of registering a subscription
relationship, but also reduces push delays because the links for sending and
receiving messages are individually optimized.
see
[P2pAutoSubscribePlugin|https://github.com/jsbxyyx/apache-artemis-plugin/blob/main/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/P2pAutoSubscribePlugin.java]
> Implement automatic subscription similar to emqx
> ------------------------------------------------
>
> Key: ARTEMIS-5875
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5875
> Project: Artemis
> Issue Type: Improvement
> Components: API, Broker, MQTT, Web Console
> Affects Versions: 2.50.0
> Reporter: Zhengtao Zhong
> Priority: Major
>
> Implement automatic subscription similar to emqx
> 1. You need to add addSubscription in ServerControl and enter the topic
> +/p2p/${clientId}
> 2. It is necessary to add the afterMQTTSessionStart() event in the
> MQTTConnection void start() method to provide an SPI interface.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]