POST /<chan_name>/v1/subscribe/<dur_name>

Creates a durable subscription on a specific channel. The request body specifies the content matcher in JSON format.

  • chan_name in the URI is the channel name.
  • dur_name in the URI is the durable name for the subscription.

The channel definition must configure FTL or EMS persistence.

HTTP Parameters

Syntax Description
type=durable_type Optional.

This parameter selects for one of an FTL channel's dynamic durable templates.

You can specify a durable type, either shared or last-value.

When absent, the channel creates the new durable using its default durable template.
key=key_field_name Required when the type is last-value.

Specify the key field of a last value durable. The key field must be present in the subscription's content matcher.

Example Requests

curl http://localhost:8585/channel201/v1/subscribe/durableA3 -d '{"color":"blue"}'
curl http://localhost:8585/channel201/v1/subscribe/durableA3?type=shared -d '{"db":"db4"}'
curl http://localhost:8585/channel201/v1/subscribe/durableA3?type=last-value&key=symbol -d '{"symbol":"amzn"}'