IBM Streams Event Streams integration
Project description
Overview
Provides functions to read messages from Event Streams as a stream and submit tuples to Event Streams as messages.
IBM® Event Streams is a fully managed, cloud-based messaging service. Built on Apache Kafka, IBM Event Streams is a high-throughput, fault-tolerant, event management platform that helps you build intelligent, responsive, event-driven applications.
Sample
A simple hello world example of a Streams application publishing to a topic and the same application consuming the same topic:
from streamsx.topology.topology import Topology from streamsx.topology.schema import CommonSchema from streamsx.topology.context import submit import streamsx.eventstreams as eventstreams import time def delay (v): time.sleep (5.0) return True topo = Topology ('EventStreamsHelloWorld') to_evstr = topo.source (['Hello', 'World!']) to_evstr = to_evstr.as_string() # delay tuple by tuple to_evstr = to_evstr.filter (delay) # Publish a stream to Event Streams using HELLO topic eventstreams.publish (to_evstr, topic='HELLO') # Subscribe to same topic as a stream from_evstr = eventstreams.subscribe (topo, schema=CommonSchema.String, topic='HELLO') # You'll find the Hello World! in stdout log file: from_evstr.print() submit ('STREAMING_ANALYTICS_SERVICE', topo)
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamsx.eventstreams-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5620ab12a238ac0886bc5c84d364e8ef1b1898dcb29e9167a59a7fa26d612f0c |
|
MD5 | dd5c4d8ed001994238dc092403c0a679 |
|
BLAKE2b-256 | 836b458f8f2c185ee720ab4099652e49a86dcea57667b56e421fb8fe44538b45 |
Close
Hashes for streamsx.eventstreams-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4076aa7bc8bd2909b2bf4a5a8c06a1d49c4169300f45540fc74bb5063a9c550e |
|
MD5 | b7cc6d06e434f68cca90bd4601eaf39a |
|
BLAKE2b-256 | 98ddaa6cee750cb2514a6996ae4df66b6e5c29c3e6508ffa4326a6ff7ddc63ba |