The following steps guide new instrument, mission, or observatory producers into setting up new notices streams that are distributed to the user community via Kafka. This process requires interaction with the GCN Team to enable accounts and Kafka topics creation on the GCN Kafka broker. The GCN Team is also happy to work with the mission teams to help construct your alerts.
Sign in / Sign up
Name Your Kafka Topics
Names of Kafka topics follow the format
gcn.notices.mission.notice_type. Pick a prefix for your Kafka topic names,
Contact the GCN Team
Send the GCN Team your list of team members from Step 1 and your chosen Kafka topic prefix from Step 2. The GCN Team will reply after they have configured producer permissions for your team.
Build Producer Code
- Log out and log back in.
- Go through the Start Streaming GCN Notices process.
- On Step 2, choose the scope
- Your producer code will look very similar to the client example code and
Step 4 of Start Streaming GCN Notices.
client_secretcan be found in Step 4 client example code.
- Start from this and adjust the
from gcn_kafka import Producer # Connect as a producer. # Warning: don't share the client secret with others. producer = Producer(client_id='fill me in', client_secret='fill me in') # any topic starting with 'mission.' topic = 'gcn.notices.mission.example' data = b'...' # any bytes producer.produce(topic, data)
Create or Update the Mission Page
Announce New Notice Types
Work with the GCN Team to draft a community announcement, which the GCN Team will circulate.