Hi,
Thank you for your detailed answer.
So when saying sequentially, you mean to wait for a status code after each command before sending the next? Or keeping a queue of continuations for commands sent and associating the responses in order? I'm a bit hesitant to do that since CometD documentation states that it does not guarantee message delivery or order (there are extensions for this though). I still don't see a fault proof solution without a correlation ID or leveraging CometD Service channels for request/response patterns. It's fine that events are grouped and fully asynchronous, but response status codes should have a deterministic way to associate with the request.
------------------------------
Francis Reynders
Stefanini NV
------------------------------
Original Message:
Sent: 03-24-2023 00:30
From: Aleksey Kovalenko
Subject: Chat API Version 2 via CometD
The nature of CometD operations is asynchronous, and so the only way to find how the request succeeded is to process its status code (it makes sense to send requests sequnetially - not in pralallel under these circumstances). The push notification through CometD may contain other events (not only the event that corresponds to the latest request submitted).
For sure, no mixture of REST API and CometD must be used - it could lead to unpredictable behavior of the solution (especially in HA/failover situations).
REST API is completely fine to use - you can read PROS and CONS on https://docs.genesys.com/Documentation/ESChat/latest/Admin/DeployAsyncReg (perfomance benchmarks section)
If your web chat application communicates with GMS through a mid-layer (i.e. your web service) - you may consider implementing https://docs.genesys.com/Documentation/ESChat/latest/Admin/ACHATPUSH - it provides notifications about new events in transcript and so you do not need to do short polling constantly - only upon notification (or once in a while just in case if something missed).
------------------------------
Aleksey Kovalenko
Genesys - Employees
------------------------------