How to maintain the channel

I execute NotificationsApi#putNotificationsChannelSubscriptions to for maintain the channel for longer than 24 hours, however NotificationListener became not received any NotificationEvent.

How to maintain the channel with keeping the topic subscribed?

status code is 200 OK. return value(entities) is empty.

log:
DEBUG : Thread-15 - <<<< PUT /api/v2/notifications/channels/streaming-3-l8v8cdohfgruuokfiauckfkqrr/subscriptions <<<<
200 OK (40 ms)

INFO : Thread-15 - Session Refresh Execute. class ChannelTopicEntityListing {
entities: []
}

Hello,

What are you sending as body in putNotificationsChannelSubscriptions?
putNotificationsChannelSubscriptions will replace the existing list of subscriptions with the one you are providing via the body parameter (array of topics).
If you send an empty array/list with putNotificationsChannelSubscriptions, it will reset/remove the existing subscriptions -> it will then return an empty entities array attribute in the response.
So with putNotificationsChannelSubscriptions, you would need to provide all existing topics you have subscribed to (via the body parameter).

Instead, you can use postNotificationsChannelSubscriptions.
postNotificationsChannelSubscriptions adds the topics you are providing via the body parameter to the existing list of subscriptions.
Moreover, if you send a postNotificationsChannelSubscriptions with an empty array/list (as body), it should simply keep the existing list of subscriptions and refresh the channel (for 24 hours).

Regards,

Thank you for your support.
I set the channel-ID on the body and sent it. After setting the subscribed topic and sending it, the value was set to entities.

entities: [class ChannelTopic {
    id: v2.users.f4a962a5-f609-4e3a-939b-fa02e6307ded.presence
    selfUri: null
}, class ChannelTopic {
    id: v2.users.f4a962a5-f609-4e3a-939b-fa02e6307ded.conversations
    selfUri: null
}]

Is this the channel session timer(24 hours) refresh now?

Yes. That's what the docs says.

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.