Skip to main content

Notifications

Notifications distributes messages in the publish and subscribe model: the application publishes once to a topic and the service delivers a copy to every subscription of that topic. The API is compatible with Amazon SNS and is used through the AWS SDKs and the AWS CLI with the Notifications address and the br-se-1 region.

In the Console, the Notifications area has two subsections: Topics and Subscriptions.

Topics​

TypeOrderAccepted subscribers
StandardBest effort, at-least-once deliveryQueues, HTTP, HTTPS, email and email JSON
FIFOOrder per message group and deduplicationQueues only
  • The topic name uses letters, digits, hyphens and underscores, up to 256 characters; FIFO topics end in .fifo.
  • The ARN has the format arn:nnumbers:sns:br-se-1:<account>:<topic> and appears on the topic page.
  • The maximum size of a published message is configurable on the topic, from 1 KiB to 1 MiB (default 256 KiB).
  • A topic accepts a display name, tags and the default HTTP delivery policy for its subscriptions.
  • Deleting a topic also deletes all of its subscriptions.

Subscriptions​

ProtocolDestinationConfirmation
sqsA queue of the same organization (given by name)Immediate
http and httpsA public URLThrough a confirmation message
emailAn email address (message text)Through a confirmation message
email-jsonAn email address (full JSON envelope)Through a confirmation message

The subscription page shows approximate counters since creation: delivered, failed, filtered and sent to the dead-letter queue, plus the last delivery and the last error.

Raw message delivery: when on, the subscriber receives only the published body, without the SNS JSON envelope. For queues, the message attributes are passed on as message attributes in the queue.

HTTP and HTTPS endpoints must be public addresses: private, internal or loopback addresses are refused, and redirects are not followed.

Not supported: SMS, mobile push notifications, Lambda functions and Firehose.

Confirmation​

http, https, email and email-json subscriptions start as pending confirmation. The service sends the destination a SubscriptionConfirmation message with a confirmation link:

  • the confirmation token is valid for 48 hours;
  • while the subscription is pending, nothing is delivered, and what was published in that period is not resent after confirmation;
  • subscriptions to queues of the same organization are confirmed immediately.

Messages are signed with the NNumbers certificate, not with an Amazon certificate. Validators that only accept certificates from amazonaws.com hosts refuse these messages: configure the validator to accept the Notifications host and download the certificate only from that host.

Filter policy​

A filter policy makes the subscription receive only the messages it cares about. It is a JSON document in the SNS format, up to 256 KiB, applied to the message attributes (default) or to the message body.

{
"event_type": ["order_created", "order_paid"],
"amount": [{ "numeric": [">=", 100] }]
}

Messages dropped by the filter show up in the filtered counter and do not count as deliveries in usage metering. An invalid policy is refused when you save it.

Delivery and retries​

For HTTP and HTTPS destinations, the delivery policy defines the retries when the endpoint answers a server error (5xx) or does not answer:

FieldRange
Minimum and maximum delay between attempts1 to 3,600 s
Number of retries0 to 100
Backoff functionlinear, arithmetic, geometric or exponential
Maximum deliveries per secondfrom 1

A 4xx answer is treated as a permanent failure and is not retried. Every attempt carries the same MessageId, so your endpoint can discard duplicates.

A subscription also accepts a dead-letter queue: whatever runs out of attempts goes to that queue, with the same body that failed, and shows up in the sent to the dead-letter queue counter. The queue must belong to the same organization.

Publish a test message​

On the topic page, anyone with the Editor role can publish one test message:

  • an optional subject (up to 100 characters) and a message of up to 256 KiB;
  • a required MessageGroupId on FIFO topics and an optional MessageDeduplicationId;
  • up to 10 message attributes of type String or Number, useful to test the filter policy.

The test publish is metered like any publish, and so are the deliveries to subscribers. After publishing, check the counters of each subscription.