Skip to main content

Communication: hbf-broadcast

1-hop view of how this service communicates with its siblings. For the full system view, see service-communication.md.

Calls Out To

ServiceProtocolPurposeKey calls / queues
hbf-coreHTTP via hbf-core-apiBroadcast records, bot deployments, subscribers, responsesBroadcastsClient.findAllBy/save(), BotDeploymentClient.findByTenantId(), SubscribersClient.findByHandle/create(), ResponsesClient.findAllBy/createOrUpdate()
Facebook Graph APIHTTPBroadcast messagingPOST /me/message_creatives, /me/broadcast_messages, /me/messages, GET /me/custom_labels, GET /{userId}
Microsoft Bot FrameworkHTTPTeams broadcast messagingPOST conversations, activities, GET pagedmembers, POST OAuth token
Slack APIHTTPSlack broadcast messagingGET conversations.members, users.info, POST chat.postMessage
Viber APIHTTPViber broadcast messagingPOST broadcast_message, GET get_user_details
SMTPnodemailerEmail delivery for campaignsEmail sending via configured SMTP
ElasticsearchHTTP clientAnalytics report dataQuery for reporting

Called By

ServiceProtocolHow
(none)--Daemon service. Not called by other services. Health check endpoint only.

Daemon Loop

Polls hbf-core every SCAN_INTERVAL_TIME (60s default) for broadcasts with pending status. Processes each broadcast: fetches subscribers, sends via appropriate channel API, updates status.

Contracts

Inbound

No inbound API (daemon only, health check endpoint).

Outbound

  • hbf-core: SDK calls for broadcast CRUD, subscriber management, response tracking
  • Facebook: Graph API broadcast and direct message endpoints
  • Microsoft Bot Framework: conversation and activity endpoints
  • Slack: chat.postMessage and member enumeration
  • Viber: broadcast_message endpoint

Env vars:

  • CORE_URL -> hbf-core
  • CORE_TOKEN -> hbf-core
  • FB_GRAPH_VERSION / FB_MAX_USERS_PER_BATCH -> Facebook
  • TEAMS_MAX_USERS_PER_BATCH -> Teams
  • VIBER_MAX_USERS_PER_BATCH -> Viber

Flows Involving This Service