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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d45fbd0bb4c87987eb34e376039093db9e39c1690a7ece20023a405863ce84 |
|
MD5 | 4868b75f6f8140a29d02aeef03db71a0 |
|
BLAKE2b-256 | 4fd63f6cf87bf1d1e530176b8a179cd09065acbb5b8365c4ff012c1f0ea72179 |
Close
Hashes for streamsx.eventstreams-1.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b76a1b51fe6403868c1ab590457be549badcdb5260a072e5d1317cd8efd1c4 |
|
MD5 | 959e83f3ba561b3cab4f87e71485a3bb |
|
BLAKE2b-256 | 0c8c381e5e3ec1fe806e2922a7d8c34999e4a10495a51af0405d1cf93d5e3e31 |