Subscription Types
Allium supports two types of Pub/Sub subscriptions:Pull Subscription
Your system pulls data from the stream. Requires a service account or user authorized to pull data.
Push Subscription
Data is sent directly to your webhook endpoint. Requires a valid webhook URL.
Setup Guide
1
Request Access to Data Streams
Email support@allium.so with the following information:
- Chains and schemas you want to access
- For Pull Subscriptions: Email address for authentication
- For Push Subscriptions: Webhook URL to receive data
2
Receive the Data
- Pull Subscription
- Push Subscription
Configure your code to connect and pull data from the Pub/Sub subscription:The data will be in compressed format:Learn more about pull subscriptions in the Google Pub/Sub docs.
3
Decompress the Data
Allium’s stream data is compressed for optimization. We use three different compression methods depending on the data characteristics:
Detect Compression Method
Check the first few bytes of the data to determine the compression method:Method | First Bytes |
---|---|
gzip | \x1f\x8b |
zstandard | \x28\xb5\x2f\xfd |
lz4 | \x04\x22\x4d\x18 |