|
1 | 1 | /* |
2 | | - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2020, 2023 Oracle and/or its affiliates. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
26 | 26 | import io.helidon.common.Builder; |
27 | 27 | import io.helidon.common.configurable.ScheduledThreadPoolSupplier; |
28 | 28 | import io.helidon.common.configurable.ThreadPoolSupplier; |
| 29 | +import io.helidon.messaging.connectors.jms.JmsConnector; |
29 | 30 |
|
| 31 | +import org.eclipse.microprofile.reactive.messaging.spi.ConnectorAttribute; |
30 | 32 | import org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory; |
31 | 33 |
|
32 | 34 | /** |
33 | 35 | * Reactive Messaging Oracle AQ connector. |
34 | 36 | */ |
| 37 | +@ConnectorAttribute(name = AqConnector.DATASOURCE_ATTRIBUTE, |
| 38 | + description = "name of the datasource bean used to connect Oracle DB with AQ", |
| 39 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 40 | + type = "string") |
| 41 | +@ConnectorAttribute(name = AqConnector.URL_ATTRIBUTE, |
| 42 | + description = "jdbc connection string used to connect Oracle DB with AQ (forbidden when datasource is specified)", |
| 43 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 44 | + type = "string") |
| 45 | +@ConnectorAttribute(name = JmsConnector.USERNAME_ATTRIBUTE, |
| 46 | + description = "User name used to connect JMS session", |
| 47 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 48 | + type = "string") |
| 49 | +@ConnectorAttribute(name = JmsConnector.PASSWORD_ATTRIBUTE, |
| 50 | + description = "Password to connect JMS session", |
| 51 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 52 | + type = "string") |
| 53 | +@ConnectorAttribute(name = JmsConnector.TYPE_ATTRIBUTE, |
| 54 | + description = "Possible values are: queue, topic", |
| 55 | + defaultValue = "queue", |
| 56 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 57 | + type = "string") |
| 58 | +@ConnectorAttribute(name = JmsConnector.DESTINATION_ATTRIBUTE, |
| 59 | + description = "Queue or topic name", |
| 60 | + mandatory = true, |
| 61 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 62 | + type = "string") |
| 63 | +@ConnectorAttribute(name = JmsConnector.ACK_MODE_ATTRIBUTE, |
| 64 | + description = "Possible values are: " |
| 65 | + + "AUTO_ACKNOWLEDGE- session automatically acknowledges a client’s receipt of a message, " |
| 66 | + + "CLIENT_ACKNOWLEDGE - receipt of a message is acknowledged only when Message.ack() is called manually, " |
| 67 | + + "DUPS_OK_ACKNOWLEDGE - session lazily acknowledges the delivery of messages.", |
| 68 | + defaultValue = "AUTO_ACKNOWLEDGE", |
| 69 | + direction = ConnectorAttribute.Direction.INCOMING, |
| 70 | + type = "io.helidon.messaging.connectors.jms.AcknowledgeMode") |
| 71 | +@ConnectorAttribute(name = JmsConnector.TRANSACTED_ATTRIBUTE, |
| 72 | + description = "Indicates whether the session will use a local transaction.", |
| 73 | + mandatory = false, |
| 74 | + defaultValue = "false", |
| 75 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 76 | + type = "boolean") |
| 77 | +@ConnectorAttribute(name = JmsConnector.AWAIT_ACK_ATTRIBUTE, |
| 78 | + description = "Wait for the acknowledgement of previous message before pulling next one.", |
| 79 | + mandatory = false, |
| 80 | + defaultValue = "false", |
| 81 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 82 | + type = "boolean") |
| 83 | +@ConnectorAttribute(name = JmsConnector.MESSAGE_SELECTOR_ATTRIBUTE, |
| 84 | + description = "JMS API message selector expression based on a subset of the SQL92. " |
| 85 | + + "Expression can only access headers and properties, not the payload.", |
| 86 | + mandatory = false, |
| 87 | + direction = ConnectorAttribute.Direction.INCOMING, |
| 88 | + type = "string") |
| 89 | +@ConnectorAttribute(name = JmsConnector.CLIENT_ID_ATTRIBUTE, |
| 90 | + description = "Client identifier for JMS connection.", |
| 91 | + mandatory = false, |
| 92 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 93 | + type = "string") |
| 94 | +@ConnectorAttribute(name = JmsConnector.DURABLE_ATTRIBUTE, |
| 95 | + description = "True for creating durable consumer (only for topic).", |
| 96 | + mandatory = false, |
| 97 | + defaultValue = "false", |
| 98 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 99 | + type = "boolean") |
| 100 | +@ConnectorAttribute(name = JmsConnector.SUBSCRIBER_NAME_ATTRIBUTE, |
| 101 | + description = "Subscriber name for durable consumer used to identify subscription.", |
| 102 | + mandatory = false, |
| 103 | + direction = ConnectorAttribute.Direction.INCOMING, |
| 104 | + type = "string") |
| 105 | +@ConnectorAttribute(name = JmsConnector.NON_LOCAL_ATTRIBUTE, |
| 106 | + description = "If true then any messages published to the topic using this session’s connection, " |
| 107 | + + "or any other connection with the same client identifier, " |
| 108 | + + "will not be added to the durable subscription.", |
| 109 | + mandatory = false, |
| 110 | + defaultValue = "false", |
| 111 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 112 | + type = "boolean") |
| 113 | +@ConnectorAttribute(name = JmsConnector.NAMED_FACTORY_ATTRIBUTE, |
| 114 | + description = "Select in case factory is injected as a named bean or configured with name.", |
| 115 | + mandatory = false, |
| 116 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 117 | + type = "string") |
| 118 | +@ConnectorAttribute(name = JmsConnector.POLL_TIMEOUT_ATTRIBUTE, |
| 119 | + description = "Timeout for polling for next message in every poll cycle in millis. Default value: 50", |
| 120 | + mandatory = false, |
| 121 | + defaultValue = "50", |
| 122 | + direction = ConnectorAttribute.Direction.INCOMING, |
| 123 | + type = "long") |
| 124 | +@ConnectorAttribute(name = JmsConnector.PERIOD_EXECUTIONS_ATTRIBUTE, |
| 125 | + description = "Period for executing poll cycles in millis.", |
| 126 | + mandatory = false, |
| 127 | + defaultValue = "100", |
| 128 | + direction = ConnectorAttribute.Direction.INCOMING, |
| 129 | + type = "long") |
| 130 | +@ConnectorAttribute(name = JmsConnector.SESSION_GROUP_ID_ATTRIBUTE, |
| 131 | + description = "When multiple channels share same session-group-id, " |
| 132 | + + "they share same JMS session and same JDBC connection as well.", |
| 133 | + mandatory = false, |
| 134 | + direction = ConnectorAttribute.Direction.INCOMING_AND_OUTGOING, |
| 135 | + type = "string") |
35 | 136 | public interface AqConnector extends ConnectorFactory { |
36 | 137 |
|
37 | 138 | /** |
|
0 commit comments