Maven users will need to add the following dependency to their pom.xml for this component:
<dependency>
<groupId>com.github.czgov</groupId>
<artifactId>camel-isds</artifactId>
<version>${use.latest.from.maven.central}</version>
</dependency>
The recomended approach is to use some BOM (Bill of Materials)
to avoid version conflicts.
There is issue
for real BOM in Camel project but camel-parent
can be used until then.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
<version>${camel.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>com.github.czgov</groupId>
<artifactId>camel-isds</artifactId>
<version>${use.latest.from.maven.central}</version>
</dependency>
</dependencies>
For downloading of specific isds message by it’s id.
Important exchange headers
Header | Default value | Description |
---|---|---|
isdsId |
null |
download message with this ID |
isdsType |
received |
download message you received. You may also download message you "sent" |
When downloading message by it’s id with isds:download
,
you might see this error:
Nemohu stahnout prijatou zpravu. 1222:Zprava dosud nebyla oznacena jako dorucena, proto ji nelze cist.
This is caused by security feature of ISDS.
According to this feature it’s forbidden to download message which wasn’t marked as delivered.
You may use option isds:download?downloadListMessages=true
get around that.
Component will first call getListOfReceivedMessages API method to trigger "delivered event" and then it should work.
Operations planned for next releases are:
-
search
for searching of databoxes based on given query
The ISDS component supports 16 endpoint options which are listed below:
Name | Group | Default | Java Type | Description |
---|---|---|---|---|
operation |
common |
|
Required Which operation should be used with isds. |
|
attachmentStore |
common |
|
|
folder for storing message attachments |
environment |
common |
|
|
Determine if you want to use real ISDS system or just testing one. Default value is real (production) system. |
password |
common |
|
Required Password for ISDS system |
|
realtime |
common |
|
|
Setting realtime to true will override options code fromto. Assuming code consumer.delay=1m then code from=now - 1 minute and code to=now. |
username |
common |
|
Required Username for ISDS system. |
|
bridgeErrorHandler |
consumer |
|
|
Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored. |
filter |
consumer |
|
|
Download only messages which are specified in filter. Null or empty for all. |
markDownloaded |
consumer |
|
|
Set ISDS message as downloaded after successful processing of exchange |
zfo |
consumer |
|
|
Download message as binary (signed) zfo data instead of Message instance. |
exceptionHandler |
consumer (advanced) |
|
To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored. |
|
from |
consumer (advanced) |
|
|
Download only messages received after this date. If using the URI the pattern expected is: code yyyy-MM-dd HH:mm:ss or code yyyy-MM-dd’T’HH:mm:ss. |
to |
consumer (advanced) |
|
|
Download only messages received before this date. If using the URI the pattern expected is: code yyyy-MM-dd HH:mm:ss or code yyyy-MM-dd’T’HH:mm:ss. |
downloadListMessages |
producer |
|
|
First call getListOfReceivedMessages before downloading message by it’s ID. See documentation of ISDS section 1.6.2.2 Novy Stav. User must login into ISDS in order to download messages. The only API method that causes user logged in event is getListOfReceivedMessages. ISDS may throw error number 1222 when downloading message if this option is set to false; |
exchangePattern |
advanced |
|
|
Sets the default exchange pattern when creating an exchange |
synchronous |
advanced |
|
|
Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). |
ISDSConsumer
extends ScheduledPollConsumer
.
This means that you can use
ScheduledPollConsumerOptions
with prefix consumer.
For example to set polling period to 72 hours, you can use:
from("isds:messages?environment=test&username=USERNAME&password=PASSWORD&consumer.delay=72h")
.log("new message ${body}");