How to specify siddhi-io-cdc extension version

35 views
Skip to first unread message

Vinoja

unread,
Aug 14, 2022, 1:29:17 AM8/14/22
to siddhi-dev
Hi,

I am using  docker run command to run a Siddhi CDC app. I need to use siddhi-io-cdc extension 2.0.12 version. Can I know how to specify this version to run this app in a docker environment?

Thank you

Vinoja

unread,
Aug 14, 2022, 12:59:48 PM8/14/22
to siddhi-dev
Following is the siddhi cdc app I am running
@App:name('post')
@source(type = 'cdc' ,url = 'jdbc:postgresql://postgres:5432/shipment_db',
username = 'postgresuser', password = 'postgrespw',
table.name = 'shipment_db.public.shipments', operation = 'insert',  plugin.name='pgoutput',
@map(type='keyvalue', @attributes(shipment_id = 'shipment_id', order_id = 'order_id',date_created='date_created',status='status')))
define stream inputStream (shipment_id int, order_id int,date_created string, status string);

@sink(type = 'log')
define stream OutputStream (shipment_id int, date_created string);

@info(name = 'query1')
from inputStream
select shipment_id, date_created
insert into OutputStream;

Following is the command I used to run siddhi cdc app
docker run -it --net postgres-docker_default --rm -p 8006:8006 -v /home/vinoja/siddhi-apps:/apps siddhiimgpostgres:tag1 -Dapps=/apps/post.siddhi

What I need to know is how to use a specific version of cdc extension when runing this app in a docker environement

Senthuran Ambalavanar

unread,
Aug 14, 2022, 1:38:28 PM8/14/22
to Vinoja, siddhi-dev
Hi,

I'm afraid that you will have to build a new docker image [1].
Is there any particular reason why you need a specific version of this extension? or are you doing this because the extension is not packed already?


Thanks,
Senthuran

--
Siddhi homepage: http://siddhi.io/
Siddhi Github repo: https://github.com/siddhi-io/siddhi
 
You received this message because you are subscribed to the Google Groups "Siddhi-dev" group.
To post to this group, send email to siddh...@googlegroups.com
To unsubscribe from this group, send email to siddhi-dev+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/siddhi-dev?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "siddhi-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to siddhi-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/siddhi-dev/e353394b-855d-4ae4-b593-e9d3944409a5n%40googlegroups.com.


--
Senthuran Ambalavanar | Associate Technical Lead | WSO2 Inc.

Vinoja Rathnayake

unread,
Aug 15, 2022, 2:52:44 AM8/15/22
to Senthuran Ambalavanar, siddhi-dev
Hi,
Thank you for the information. I need to use a particular cdc version because the default version (version 2.0.5) is giving 'Producer failure java.lang.IllegalArgumentException: Invalid identifier:' error log when inserting data to the database table. Can I know how to specify the siddhi-io-cdc version in this Dockerfile?
Thank you

Senthuran Ambalavanar

unread,
Aug 15, 2022, 8:50:33 AM8/15/22
to Vinoja Rathnayake, siddhi-dev
Hi,

Please follow the example [1]. 
If you see the dockerfile given in the example, we specify the bundle directory as ARG HOST_BUNDLES_DIR=./files/bundles
You can place your particular jar file (siddhi-io-cdc_2.0.5) in this directory, and create a Docker image out of this dockerfile. The jar(s) would be then bundled during the docker build phase.

Vinoja Rathnayake

unread,
Aug 15, 2022, 9:13:04 AM8/15/22
to Senthuran Ambalavanar, siddhi-dev
Thank you for the clarification.
Reply all
Reply to author
Forward
0 new messages