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.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e357e779b7a7ee7ee96ab708208bcd7ca7c12bc8ee85b2da8797fd050ef453d |
|
MD5 | 7856e90ec40e7434622d2598a231ecdf |
|
BLAKE2b-256 | 4d185c333d857f837a64f2e2d58c715d63c4ba86660acca49f8f84ea98b19039 |
Close
Hashes for streamsx.eventstreams-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e35281d130e2e56f93805488438c4bc057e1198998b5ff6fa3f29b67d52011e |
|
MD5 | 64faff1cbf28ca33eff2370aae0b96eb |
|
BLAKE2b-256 | ce622bd8af86070fd21600036296589e9b8cae056b43784e676156dda125034e |