-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Consumer failed after 48 hours #1526
Comments
The theory is this issue is a side-effect of #1519. The assumption is that both the producer and consumer were running on the same host. And as the producer used up all of the TCP resources, eventually we would see failure in the consumer. I was able to set up and run some lightly modified example code, which ran concurrently with code from #1519. Both have been running for more than 48 hours #!/usr/bin/env python3
import requests
import time
from fluvio import (Fluvio, Offset)
def send_slack_message(message):
payload = '{"text": "%s"}' % message
#endpoint = "https://hooks.slack.com/services/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"
endpoint = "https://ptsv2.com/t/op9bn-1630810794/post"
response = requests.post(endpoint,
data=payload)
print(response.text)
def consume():
value = "0"
fluvio = Fluvio.connect()
print("connected to fluvio")
consumer = fluvio.partition_consumer("fluvio-stars", 0)
print("retrieved consumer")
for i in consumer.stream(Offset.from_end(1)):
received = i.value_string()
print("received: %s" % received)
if value == "":
value = received
elif value != received:
value = received
send_slack_message(value)
time.sleep(1)
def main():
consume()
if __name__ == "__main__":
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I received the following connection error:
The script reads from fluvio and sends message to slack:
The text was updated successfully, but these errors were encountered: