czgov / camel-isds Goto Github PK
View Code? Open in Web Editor NEWCamel component for czech system ISDS (Informační Systém Datových Schránek).
License: MIT License
Camel component for czech system ISDS (Informační Systém Datových Schránek).
License: MIT License
One must know the recipient ID to send him message currently.
This issue would allow for instance this use case
from("....")
if
databox id found
else
Implement basic consumer for reading messages from ISDS.
It's convenient for storing to *.zfo
file and opening in some editor.
In the future there should be support for downloading and sending messages,
but also for searching databox ids, downloading single message...
It might be used for instance like this:
// camel route example
from("some event")
.header("id", "45678")
.to("isds:download?username=asdf&password=asdf")
Underlying JavaISDS library can store message attachments either to ByteArray
or to filesytem.
Make path to filesystem store configurable.
add features.xml
http://camel.apache.org/type-converter.html
file src/main/resources/META-INF/services/org/apache/camel/TypeConverter
allows to specify just package name or FQDN
but package name doesn't work with spring-boot and openshift.
Need to switch to FQDN.
Following exception is thrown unless we specify FQDN
Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the following packages: [com.github.czgov.isds.types]
at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:119)
at org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:602)
at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:53)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1283)
at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1243)
at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:2369)
... 38 common frames omitted
Component uses polling consumer.
Delay between polls can be configured with consumer.delay
uri param.
ISDS messages must be queried with time interval specifying time of message receive.
The interval is currently being calculated as
(datetime.now - consumer.delay) < received time < datetime.now>
.
There might be situation when message arrives just during poll and next message poll would miss it.
Prevent situations where message could be received during poll and might be missed during next poll.
https://camel.apache.org/batch-consumer.html
inspiration in camel-mail component which supports batching
https://github.com/apache/camel/blob/4e1759aebb1f7917cd8dbcdeb69edcfa63e952e2/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java#L49
Currently `to("isds:messages") supported message in body.
Allow body to be null and build message from camel headers (subject and to) and attachments
It's problematic in templating and in expressions in simple language.
${header.isds.foo}
is interpreted as header isds
and it's attribute foo
.
It might be better to use prefix isds
and camel case names instead of dots.
Underlying library supports message filtering in search method:
http://static.javadoc.io/cz.abclinuxu.datoveschranky/isds-common/1.0.0.Alpha/cz/abclinuxu/datoveschranky/common/interfaces/DataBoxMessagesService.html#getListOfReceivedMessages-java.util.Date-java.util.Date-java.util.EnumSet-int-int-
Mark isds message as downloaded after successful processing.
Fix version conflicts in jaxb-*
between camel and java-isds.
java.lang.NoSuchFieldError: REFLECTION
at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:729)
at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:574)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:402)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:683)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:340)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:323)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:361)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:365)
at javax.xml.ws.Service.getPort(Service.java:188)
at cz.abclinuxu.datoveschranky.impl.Authentication.createService(Authentication.java:31)
at cz.abclinuxu.datoveschranky.impl.DataBoxManager.getDataBoxMessagesService(DataBoxManager.java:58)
at com.github.czgov.isds.ISDSConsumer.poll(ISDSConsumer.java:54)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.