Skip to content
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

No reconnect attempt made by Sink after an event goes to Error Store #246

Closed
AnuGayan opened this issue Nov 29, 2021 · 1 comment
Closed

Comments

@AnuGayan
Copy link
Contributor

Description:
No reconnect attempt made by Sink after an event goes to Error Store.

Affected Siddhi Version:
5.1.19

OS, DB, other environment details and versions:
N/A

Steps to reproduce:

  1. Configure ERROR STORE for SI 4.0.0 (refer doc - https://ei.docs.wso2.com/en/7.2.0/streaming-integrator/guides/handling-errors/)
  2. Write a Siddhi app with a Sink having the annotation on.error='STORE'. Refer sample siddhi app below. I have used a Kafka Sink.
@App:name("HTTPToKafka")
@App:description('Consume events from HTTP and publish to Kafka.')

@Source(type = 'http', receiver.url='http://localhost:8006/SweetProductionStream', basic.auth.enabled='false',
        @map(type='json'))
define stream SweetProductionStream (name string, amount double);

@sink(type='kafka',
          on.error='STORE',
          topic='bulk-orders',
          bootstrap.servers='localhost:9092',
--       partition.no='0',
          is.synchronous='true',
          retry.send='true',
          @map(type='json'))
    define stream BulkOrdersStream (name string, amount double);

from SweetProductionStream
select name, amount
insert into BulkOrdersStream;
  1. Start the SI 4.0.0 server and deploy the Siddhi app.
  2. Make sure that the Sink is not connected. In this example, I have shut down the Kafka server.
  3. Send the following CURL command to publish an event in to the HTTP Source.
curl -X POST -d "{\"event\": {\"name\":\"Baked alaska\",\"amount\": 34.0}}"  http://localhost:8006/SweetProductionStream --header "Content-Type:application/json"

Wait until the CURL command is finished executing (i.e. until you see the command prompt back. Based on your Kafka client's timeout/retry config, this waiting time will differ)
6. Optional step: now you may start SI Tooling 4.0.0 and verify that the event is saved in the Error Store.
7. Now spin up the Kafka server. Let's refer to the Kafka home folder as <KAFKA_HOME>
I have used kafka_2.11-0.10.2.1
Open <KAFKA_HOME> on two terminals and execute the following commands to start the Kafka server

sh bin/zookeeper-server-start.sh config/zookeeper.properties
sh bin/kafka-server-start.sh config/server.properties
  1. Go to <KAFKA_HOME> and execute the following command to start the Kafka Console Consumer
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic bulk-orders --from-beginning
  1. Send the following CURL command to publish an event in to the HTTP Source.
curl -X POST -d "{\"event\": {\"name\":\"Eclairs\",\"amount\": 23.0}}"  http://localhost:8006/SweetProductionStream --header "Content-Type:application/json"

Expected Output:
On the Kafka Console Consumer (which we started in Step 8 above), you should see the following new event.

{"event":{"name":"Eclairs","amount":23.0}}

Actual Output:
No new event is shown but the event appears on the error store.

@AnuGayan
Copy link
Contributor Author

Closed by siddhi-io/siddhi#1755

@AnuGayan AnuGayan added this to the 4.1.0-M2 milestone Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant