mxsm commented on code in PR #4653:
URL: https://github.com/apache/eventmesh/pull/4653#discussion_r1427580565
##########
eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/EventMeshGrpcConsumer.java:
##########
@@ -93,27 +96,26 @@ public void init() {
heartBeat();
}
+ /**
+ * Subscribes to an event at a specified URL(Webhook).
+ *
+ * @param subscriptionItems The list of subscription items.
+ * @param url The URL to subscribe to.
+ * @return A response containing information about the subscription result.
+ */
public Response subscribe(final List<SubscriptionItem> subscriptionItems,
final String url) {
Review Comment:
> This is my question. What is the correlation between using this method for
subscription and the Webhook mechanism? Will EventMesh push consumers through
this URL when new messages are generated?
>
> 这是我的疑问,使用该方法进行订阅和Webhook机制是什么关联?是产生新消息时,EventMesh会通过该URL推送给消费者吗?
Yes, Previously, gRPC subscriptions were divided into two categories: normal
subscription consumption (stream), and webhook subscriptions. These were
primarily handled by the SubscribeProcessor. Within this, we can clearly see
some validation for webhooks. When a producer sends a message, the runtime
receives it and then sends it to the corresponding URL address provided during
subscription via the URL given. Therefore, this is where the problem arises,
and when there is no stream subscription, it is necessary to switch to a
heartbeating method to resolve the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]