New Notice Producers
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.
Start Producing Alerts
Sign in / Sign up
Decide which of your team members will have programmatic access to produce your alerts. Make sure that they have all signed in at least once to the GCN website and the GCN test website.
Name Your Kafka Topics
Names of Kafka topics follow the format
gcn.notices.mission.notice_type
. Pick a prefix for your Kafka topic names,mission.*
.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
gcn.nasa.gov/kafka-mission-producer
. - Your producer code will look very similar to the client example code and
Step 4 of Start Streaming GCN Notices.
client_id
andclient_secret
can be found in Step 4 client example code. - Start from this and adjust the
client_id
,client_secret
,topic
anddata
content:
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
Create a new mission page by submitting a pull request or by sending text to the GCN Team.
Announce New Notice Types
Work with the GCN Team to draft a community announcement, which the GCN Team will circulate.