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.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11006f58440d3dbaccd65074142a065fe05fa8287544aeba3aa6260fe69d95a4 |
|
MD5 | 5e555c3018ee719f93c9c0173314aa3a |
|
BLAKE2b-256 | 220a7f13bcfaaf2ce6fcfd8dd1ab86cc7658a93346475c89926c4167fd6be7df |
Close
Hashes for streamsx.eventstreams-1.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71868cde01684726755bd931cd8261dd53732ef804a6a4751a8f133a3525dfd6 |
|
MD5 | 4195358cdca3c959703c44cddbd76e89 |
|
BLAKE2b-256 | 27a4bde7dae7d0adba391c8fdedd04a4babcbea2ac8f4e3c2a10532db8d8302f |