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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2e7dba772a281a747ca68274e0e6755062ce9e780f6cd771072bf7d8c44027a |
|
MD5 | 32f0c75de51217e9005f75aca8edc370 |
|
BLAKE2b-256 | aa5f26017b8b6eac1911e2dadaca36dc4d0ea715a3c41a71f334475a2f5b01e6 |
Close
Hashes for streamsx.eventstreams-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4290cf9861ab18f61d2d5234fcbc45116d935ddb13ed2fababcff9b9854fbea3 |
|
MD5 | 59cec0bea63870df8a0997584c2f6bdf |
|
BLAKE2b-256 | 877644a6eb5e78d03082a543a4f9842aa810f8f84771fd461ea2d1aa1cf35b4c |