Skip to content

sns support#1

Merged
rassokhin-s merged 3 commits into
masterfrom
sns-support
Oct 25, 2021
Merged

sns support#1
rassokhin-s merged 3 commits into
masterfrom
sns-support

Conversation

@rassokhin-s

@rassokhin-s rassokhin-s commented Oct 15, 2021

Copy link
Copy Markdown
Contributor
  • Add SNS client
  • Add github action for automatic publishing on release creation

@antonyharfield antonyharfield left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the typescript definitions! 💯

@rassokhin-s rassokhin-s merged commit 1d4ef48 into master Oct 25, 2021
@rassokhin-s rassokhin-s deleted the sns-support branch October 25, 2021 19:37
topherwhite pushed a commit to rfcx/rfcx-api that referenced this pull request May 16, 2026
@rfcx/message-queue gained a 'rabbitmq' client in v1.1.0 (alongside
existing 'sqs' and 'sns'). This commit:

- Bumps @rfcx/message-queue from ^1.0.8 to github:rfcx/message-queue#1.1.0
  (using the git ref because the npm publish workflow needs a token
  refresh; identical content, can be flipped back to ^1.1.0 once npm
  registry has it)

- Adds env-var-gated branch in common/message-queue/sqs.js and sns.js
  to pick the backend:
    MESSAGE_QUEUE_KIND       unset (default) | sqs | rabbitmq
    MESSAGE_QUEUE_KIND_SNS   unset (default = sns, or mirrors KIND when rabbitmq) | sqs | rabbitmq

When MESSAGE_QUEUE_KIND is unset, behavior is bit-identical to upstream
(SQS backend). Production env mirror has no MESSAGE_QUEUE_KIND set, so
the deploy is safe.

When MESSAGE_QUEUE_KIND=rabbitmq, the broker URL comes from RABBITMQ_URL
(or legacy AMQP_URL). The rabbitmq client asserts durable queues with
prefetch=1 and ack-on-true / nack-without-requeue semantics — closest
match to SQS without a redrive policy.

Note: the per-classifier-queue path (tasks/segment-created/
classifier-message-queue/index.js) still hardcodes 'sqs' because its
downstream consumers are external Python ML workers we don't manage.
Only the events that have in-cluster consumers (segmentCreated,
classifierJobFinished into core-tasks) actually traverse the new
backend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants