FHIR Chat · Subscription channel type 'message' · hapi

Stream: hapi

Topic: Subscription channel type 'message'


view this post on Zulip Ron Shapiro (Feb 26 2021 at 17:16):

I am attempting to create a Subscription on http://hapi.fhir.org/baseR4/ with a channel type 'message'.

However, the following error is returned:

Only 'channel' protocol is supported for Subscriptions with channel type 'message'

view this post on Zulip Ron Shapiro (Feb 26 2021 at 17:19):

The HAPI source code has the following:

try {
        URI uri = new URI(theEndpointUrl);
        if (!"channel".equals(uri.getScheme())) {
                throw new UnprocessableEntityException("Only 'channel' protocol is supported for Subscriptions with channel type 'message'");
        }
        String channelName = uri.getSchemeSpecificPart();
        if (isBlank(channelName)) {
                throw new UnprocessableEntityException("A channel name must appear after channel: in a message Subscription endpoint");
        }
} catch (URISyntaxException e) {
        throw new UnprocessableEntityException("Invalid subscription endpoint uri " + theEndpointUrl, e);
}

So what is a "channel" scheme? I am attempting to provide an http endpoint.

view this post on Zulip Ron Shapiro (Mar 03 2021 at 19:40):

@Gary Graham github shows that you may have added the above code... can you shed any light on what a "channel" URI scheme is?

view this post on Zulip G G (Mar 03 2021 at 19:50):

Heya, this is not my code, but I can answer this:
You are probably looking for a subscription of type rest-hook. Message type expects a jms channel scheme of the form "channel:my-queue-name". You can see examples here: https://smilecdr.com/docs/subscription/channels.html

view this post on Zulip dsh (Apr 06 2021 at 21:49):

G G said:

Heya, this is not my code, but I can answer this:
You are probably looking for a subscription of type rest-hook. Message type expects a jms channel scheme of the form "channel:my-queue-name". You can see examples here: https://smilecdr.com/docs/subscription/channels.html

Does this also work with open source HAPI? Also is the backing JMS queue persisted in database or is it all in memory? If in memory then how do you make it persistent?


Last updated: Apr 12 2022 at 19:14 UTC