IBM Streams Event Streams integration
Project description
Overview
Provides functions to read messages from Event Streams as a stream and publish 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, ContextTypes import streamsx.eventstreams as eventstreams import time def delay(v): time.sleep(5.0) return True topology = Topology('EventStreamsHelloWorld') to_evstr = topology.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(topology, schema=CommonSchema.String, topic='HELLO') # You'll find the Hello World! in stdout log file: from_evstr.print() # finally submit the topology to a Streaming Analytics Service instance submit(ContextTypes.STREAMING_ANALYTICS_SERVICE, topology)
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.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2b0430d4abcc16705c20352eb11292f8a1d5163691df02f3571dab777f4487a |
|
MD5 | a632ed6d79b6aefdb955e57c950f1d0a |
|
BLAKE2b-256 | 4116bdf0b7e4e14d4781e8570cba1375374774db0e86c2af949a09bf69b4b4de |
Close
Hashes for streamsx.eventstreams-1.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5fea5324e4fbed5e6c53f8850ce3bfde40d5c53bd74a189e0b0b28304df263b |
|
MD5 | babfc118336dcad3255a6bda69927876 |
|
BLAKE2b-256 | 13554e276e5ff453a483543387fd0815da9748efcbd8111c96805a48bd8b1ee8 |