Skip to content

Commit 19b0e5a

Browse files
paulparkinsonRichardExleyrenagranat
authored
observability work and various (#140)
* inventory-go work * inventory-go aq dequeue added * Build Reorg * Update main-setup.sh Reorg password collection * Update main-setup.sh Minor fixes * Minor Fixes * Binding Changes * Fixes * Remove Legacy Code Removed admin-helidon, atp-setup, Removed initContainers from deployment yamls * inventory-go working with pl/sql * Fixed inventory-helidon-se * Minor fixes * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update db-setup.sh * Update main-setup.sh * Update main-setup.sh * Update db-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update db-setup.sh * Fixes go build.sh fix * Update java-builds.sh * Update non-java-builds.sh * Update oke-setup.sh * Update oke-setup.sh * Update db-setup.sh * Update non-java-builds.sh * Update java-builds.sh * Update non-java-builds.sh * Update java-builds.sh * Update db-setup.sh * Update oke-setup.sh * Update java-builds.sh * Update non-java-builds.sh * Update java-builds.sh * Update non-java-builds.sh * Update oke-setup.sh * Simpler Approach * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh Remove API Key based authentication as bug is fixed * Update main-destroy.sh Complete API Key removal * Update destroy.sh * Fix Inventory DotNet and Go * Update logback.xml Fixed inventory-helidon-se * Update db-setup.sh Protect password in it contains case special characters * dotnet and go services: switch to polling for msgs * Update main-setup.sh * Update main-setup.sh * Update main-setup.sh * verrazzano/multi-cloud work * verrazzano comp files * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * polyglot inventory service mods * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * verrazzano/multi-cloud work * inventory-springboot * inventory-helidon fix * mongodb install * mongodm * mongodb install * mongodm * mongodm * mongo-kafka-postgres work * mongodb-kafka-postgres work * mongo * postgres work * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongodm * mongo etc work * mongo kafka postgres work * mongo kafka postgres work * mongo kafka postgres work * removed sqlnet.ora edit * removed sqlnet.ora edit * removed sqlnet.ora edit * dotnet docker work and password/url fix * dotnet docker work and password/url fix * dotnet docker work and password/url fix * dotnet docker work and password/url fix * dotnet docker work and password/url fix * dotnet docker work and password/url fix * dotnet docker work and password/url fix * dotnet docker work and password/url fix * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * recovery test work * recovery test work * recovery test work * recovery test work * replace postgres configmap with secret * replace postgres configmap with secret * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * TEQ setup and tracing * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * grafana work * grafana work * grafana work * grafana work * grafana work * grafana work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * dotnet work * dotnet work * dotnet work * dotnet work * dotnet work * observability, dotnet, go, etc. work - move kafka etc. build to nonjava * observability, dotnet, go, etc. work - move kafka etc. build to nonjava * observability, dotnet, go, etc. work - move kafka etc. build to nonjava Co-authored-by: RichardExley <Richard.exley@oracle.com> Co-authored-by: irina granat <irina.granat@oracle.com>
1 parent 99d2b8e commit 19b0e5a

39 files changed

+4805
-64
lines changed

grabdish/frontend-helidon/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>io.helidon.applications</groupId>
2525
<artifactId>helidon-mp</artifactId>
26-
<version>2.2.0</version>
26+
<version>2.3.1</version>
2727
<relativePath/>
2828
</parent>
2929

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package io.helidon.data.examples;
2+
3+
import javax.enterprise.context.ApplicationScoped;
4+
import javax.ws.rs.ApplicationPath;
5+
import javax.ws.rs.core.Application;
6+
import java.util.HashSet;
7+
import java.util.Set;
8+
9+
10+
@ApplicationScoped
11+
@ApplicationPath("/")
12+
public class FrontEndApplication extends Application {
13+
14+
@Override
15+
public Set<Class<?>> getClasses() {
16+
Set<Class<?>> s = new HashSet<Class<?>>();
17+
s.add(FrontEndResource.class);
18+
return s;
19+
}
20+
21+
}

grabdish/inventory-dotnet/Startup.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ public String ListenForMessages()
9595
)
9696
{
9797
connection.Open();
98-
Console.WriteLine("listening for messages...");
9998
while (true) {
10099
try
101100
{
101+
Console.WriteLine("listening for messages...");
102+
OracleTransaction tx = connection.BeginTransaction();
102103
//dequeue from order queues (out param)
103104
OracleCommand orderReceiveMessageCommand = new OracleCommand();
104105
orderReceiveMessageCommand.Connection = connection;
@@ -119,10 +120,8 @@ public String ListenForMessages()
119120
}
120121
Order order;
121122
try {
122-
order =
123-
JsonConvert
124-
.DeserializeObject<Order>("" +
125-
orderReceiveMessageCommand.Parameters["p_orderInfo"].Value);
123+
order = JsonConvert.DeserializeObject<Order>(
124+
"" + orderReceiveMessageCommand.Parameters["p_orderInfo"].Value);
126125
} catch (System.NullReferenceException ex) {
127126
Console.WriteLine("message was null" + ex);
128127
System.Threading.Thread.Sleep(1000);
@@ -207,6 +206,7 @@ public String ListenForMessages()
207206
p_inventoryInfoParam
208207
);
209208
inventorySendMessageCommand.ExecuteNonQuery();
209+
tx.Commit();
210210
}
211211
catch (NullReferenceException ex) {
212212
if(ex != null) System.Threading.Thread.Sleep(1000);

grabdish/inventory-dotnet/dequeueenqueue.sql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ IS
1212
pragma exception_init(no_messages, -25228);
1313

1414
BEGIN
15-
dequeue_options.wait := dbms_aq.NO_WAIT;
16-
-- dequeue_options.wait := dbms_aq.FOREVER;
15+
-- dequeue_options.wait := dbms_aq.NO_WAIT;
16+
dequeue_options.wait := dbms_aq.FOREVER;
1717
-- dequeue_options.navigation := dbms_aq.FIRST_MESSAGE;
1818
-- dequeue_options.dequeue_mode := dbms_aq.LOCKED;
1919

@@ -34,8 +34,6 @@ BEGIN
3434
WHEN no_messages THEN
3535
BEGIN
3636
p_orderInfo := '';
37-
-- p_action := '';
38-
-- p_orderid := 0;
3937
END;
4038
WHEN OTHERS THEN
4139
RAISE;

grabdish/inventory-go/inventory.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,20 @@ func main() {
5555
func listenForMessages(ctx context.Context, db *sql.DB) {
5656

5757
for {
58+
5859
tx, err := db.BeginTx(ctx, nil)
60+
if err != nil {
61+
// t.Fatal(err)
62+
fmt.Printf("Error during db.BeginTx(ctx, nil): %s\n", err)
63+
}
64+
defer tx.Rollback()
65+
fmt.Printf("Listening for messages...tx: %s\n", tx)
5966
// fmt.Println("__________________________________________")
6067
//receive order...
6168
var orderJSON string
6269
dequeueOrderMessageSproc := `BEGIN dequeueOrderMessage(:1); END;`
63-
if _, err := db.ExecContext(ctx, dequeueOrderMessageSproc, sql.Out{Dest: &orderJSON}); err != nil {
70+
// if _, err := db.ExecContext(ctx, dequeueOrderMessageSproc, sql.Out{Dest: &orderJSON}); err != nil {
71+
if _, err := tx.ExecContext(ctx, dequeueOrderMessageSproc, sql.Out{Dest: &orderJSON}); err != nil {
6472
log.Printf("Error running %q: %+v", dequeueOrderMessageSproc, err)
6573
return
6674
}
@@ -87,7 +95,8 @@ func listenForMessages(ctx context.Context, db *sql.DB) {
8795
//check inventory...
8896
var inventorylocation string
8997
sqlString := "update INVENTORY set INVENTORYCOUNT = INVENTORYCOUNT - 1 where INVENTORYID = :inventoryid and INVENTORYCOUNT > 0 returning inventorylocation into :inventorylocation"
90-
_, errFromInventoryCheck := db.Exec(sqlString, sql.Named("inventoryid", order.Itemid), sql.Named("inventorylocation", sql.Out{Dest: &inventorylocation}))
98+
// _, errFromInventoryCheck := db.Exec(sqlString, sql.Named("inventoryid", order.Itemid), sql.Named("inventorylocation", sql.Out{Dest: &inventorylocation}))
99+
_, errFromInventoryCheck := tx.ExecContext(ctx, sqlString, sql.Named("inventoryid", order.Itemid), sql.Named("inventorylocation", sql.Out{Dest: &inventorylocation}))
91100
if err != nil {
92101
fmt.Println("errFromInventoryCheck: %s", errFromInventoryCheck)
93102
}
@@ -121,7 +130,8 @@ func listenForMessages(ctx context.Context, db *sql.DB) {
121130
inventoryJsonString := string(inventoryJsonData)
122131
fmt.Println("inventoryJsonData:" + inventoryJsonString) // :inventoryid
123132
messageSendSproc := `BEGIN enqueueInventoryMessage(:1); END;`
124-
if _, err := db.ExecContext(ctx, messageSendSproc, inventoryJsonString); err != nil {
133+
// if _, err := db.ExecContext(ctx, messageSendSproc, inventoryJsonString); err != nil {
134+
if _, err := tx.ExecContext(ctx, messageSendSproc, inventoryJsonString); err != nil {
125135
log.Printf("Error running %q: %+v", messageSendSproc, err)
126136
return
127137
}

grabdish/inventory-helidon-se/src/main/java/com/helidon/se/persistence/context/OracleJmsDBContext.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,10 @@ public String sendMessage(Object message, String owner, String queueName) throws
8282
Topic topic = ((AQjmsSession) session).getTopic(owner, queueName);
8383
TopicPublisher publisher = session.createPublisher(topic);
8484
TextMessage jmsMessage = session.createTextMessage(JsonUtils.writeValueAsString(message));
85-
// <stub for msdataworkshop>
8685
jmsMessage.setIntProperty("Id", 1);
8786
jmsMessage.setIntProperty("Priority", 2);
88-
jmsMessage.setJMSCorrelationID("" + 2);
87+
// jmsMessage.setJMSCorrelationID("" + 2);
8988
jmsMessage.setJMSPriority(2);
90-
// </stub for msdataworkshop>
9189
publisher.publish(topic, jmsMessage, DeliveryMode.PERSISTENT,2, AQjmsConstants.EXPIRATION_NEVER);
9290
session.commit();
9391
String id = jmsMessage.getJMSMessageID();
@@ -100,8 +98,6 @@ public String getMessage(String owner, String queueName) throws JMSException, SQ
10098
getConnection(); // using for init connections if needed
10199
Queue queue = ((AQjmsSession) session).getQueue(owner, queueName);
102100
MessageConsumer consumer = session.createConsumer(queue);
103-
104-
// -1 means wait forever
105101
TextMessage message = (TextMessage) consumer.receive(-1);
106102
if (message != null) {
107103
String id = message.getJMSMessageID();

grabdish/inventory-helidon/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>io.helidon.applications</groupId>
2525
<artifactId>helidon-mp</artifactId>
26-
<version>2.2.0</version>
26+
<version>2.3.1</version>
2727
<relativePath/>
2828
</parent>
2929

@@ -206,6 +206,15 @@
206206
<artifactId>oci-java-sdk-secrets</artifactId>
207207
<version>1.32.2</version>
208208
</dependency>
209+
<dependency>
210+
<groupId>io.helidon.tracing</groupId>
211+
<artifactId>helidon-tracing-jaeger</artifactId>
212+
</dependency>
213+
<dependency>
214+
<groupId>io.opentracing.contrib</groupId>
215+
<artifactId>opentracing-jms-1</artifactId>
216+
<version>0.1.11</version>
217+
</dependency>
209218
</dependencies>
210219

211220
</project>

grabdish/inventory-helidon/src/main/java/io/helidon/data/examples/InventoryResource.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import javax.ws.rs.core.MediaType;
1919
import javax.ws.rs.core.Response;
2020

21+
import io.opentracing.Tracer;
2122
import oracle.ucp.jdbc.PoolDataSource;
2223

2324
@Path("/")
@@ -27,9 +28,9 @@ public class InventoryResource {
2728
@Inject
2829
@Named("inventorypdb")
2930
PoolDataSource atpInventoryPDB;
30-
static String regionId = System.getenv("OCI_REGION").trim();
31-
static String pwSecretOcid = System.getenv("VAULT_SECRET_OCID").trim();
32-
static String pwSecretFromK8s = System.getenv("dbpassword").trim();
31+
static String regionId = System.getenv("OCI_REGION");
32+
static String pwSecretOcid = System.getenv("VAULT_SECRET_OCID");
33+
static String pwSecretFromK8s = System.getenv("dbpassword");
3334
static String inventoryuser = "INVENTORYUSER";
3435
static String inventorypw;
3536
static String inventoryQueueName = "inventoryqueue";
@@ -41,10 +42,13 @@ public class InventoryResource {
4142
System.setProperty("oracle.jdbc.fanEnabled", "false");
4243
}
4344

45+
@Inject
46+
private Tracer tracer;
47+
4448
public void init(@Observes @Initialized(ApplicationScoped.class) Object init) throws SQLException {
4549
System.out.println("InventoryResource.init " + init);
4650
String pw;
47-
if(!pwSecretOcid.trim().equals("")) {
51+
if(pwSecretOcid != null && !pwSecretOcid.equals("")) {
4852
pw = OCISDKUtility.getSecreteFromVault(true, regionId, pwSecretOcid);
4953
} else {
5054
pw = pwSecretFromK8s;
@@ -59,6 +63,10 @@ public void init(@Observes @Initialized(ApplicationScoped.class) Object init) th
5963
listenForMessages();
6064
}
6165

66+
Tracer getTracer() {
67+
return tracer;
68+
}
69+
6270
@Path("/listenForMessages")
6371
@GET
6472
@Produces(MediaType.TEXT_PLAIN)

grabdish/inventory-helidon/src/main/java/io/helidon/data/examples/InventoryServiceOrderEventConsumer.java

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
*/
77
package io.helidon.data.examples;
88

9+
import io.opentracing.Span;
10+
import io.opentracing.contrib.jms.TracingMessageProducer;
11+
import io.opentracing.contrib.jms.common.TracingMessageConsumer;
912
import oracle.jdbc.internal.OraclePreparedStatement;
1013
import oracle.jms.*;
1114

@@ -27,16 +30,23 @@ public InventoryServiceOrderEventConsumer(InventoryResource inventoryResource) {
2730

2831
@Override
2932
public void run() {
30-
System.out.println("Receive messages...");
33+
boolean isPLSQL = Boolean.valueOf(System.getProperty("isPLSQL", "false"));
34+
boolean isRollback = Boolean.valueOf(System.getProperty("isRollback", "false"));
35+
boolean isAutoCommit = Boolean.valueOf(System.getProperty("isAutoCommit", "false"));
36+
System.out.println("Receive messages... isPLSQL:" + isPLSQL);
37+
System.out.println("... isRollback:" + isRollback);
38+
System.out.println("... isAutoCommit:" + isAutoCommit);
3139
try {
32-
listenForOrderEvents();
40+
if (isPLSQL)listenForOrderEventsPLSQL(isRollback, isAutoCommit);
41+
else listenForOrderEvents();
3342
} catch (Exception e) {
3443
e.printStackTrace();
3544
}
3645
}
3746

38-
public void listenForOrderEventsPLSQL() throws Exception {
47+
public void listenForOrderEventsPLSQL(boolean isRollback, boolean isAutoCommit) throws Exception {
3948
Connection connection = inventoryResource.atpInventoryPDB.getConnection();
49+
if(!isAutoCommit) connection.setAutoCommit(false);
4050
while (true) {
4151
System.out.println("InventoryServiceOrderEventConsumer.listenForOrderEvents with sproc");
4252
CallableStatement cstmt = null;
@@ -50,8 +60,11 @@ public void listenForOrderEventsPLSQL() throws Exception {
5060
ResultSet rs = cstmt.getResultSet();
5161
hadResults = cstmt.getMoreResults();
5262
}
53-
String outputValue = cstmt.getString(1); // index-based
54-
connection.rollback();
63+
String outputValue = cstmt.getString(1);
64+
if (!isAutoCommit) {
65+
if (isRollback) connection.rollback();
66+
else connection.commit();
67+
}
5568
System.out.println("InventoryServiceOrderEventConsumer.listenForOrderEvents outputValue:" + outputValue);
5669
}
5770
}
@@ -60,8 +73,7 @@ public void listenForOrderEvents() throws Exception {
6073
QueueConnectionFactory qcfact = AQjmsFactory.getQueueConnectionFactory(inventoryResource.atpInventoryPDB);
6174
QueueSession qsess = null;
6275
QueueConnection qconn = null;
63-
AQjmsConsumer consumer = null;
64-
76+
TracingMessageConsumer tracingMessageConsumer = null;
6577
boolean done = false;
6678
while (!done) {
6779
try {
@@ -70,10 +82,11 @@ public void listenForOrderEvents() throws Exception {
7082
qsess = qconn.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
7183
qconn.start();
7284
Queue queue = ((AQjmsSession) qsess).getQueue(inventoryResource.inventoryuser, inventoryResource.orderQueueName);
73-
consumer = (AQjmsConsumer) qsess.createConsumer(queue);
85+
AQjmsConsumer consumer = (AQjmsConsumer) qsess.createConsumer(queue);
86+
tracingMessageConsumer = new TracingMessageConsumer(consumer, inventoryResource.getTracer());
7487
}
75-
if (consumer == null) continue;
76-
TextMessage orderMessage = (TextMessage) (consumer.receive(-1)); //todo address JMS-257: receive(long timeout) of javax.jms.MessageConsumer took more time than the network timeout configured at the java.sql.Connection.
88+
if (tracingMessageConsumer == null) continue;
89+
TextMessage orderMessage = (TextMessage) (tracingMessageConsumer.receive(-1));
7790
String txt = orderMessage.getText();
7891
System.out.println("txt " + txt);
7992
System.out.print("JMSPriority: " + orderMessage.getJMSPriority());
@@ -96,22 +109,32 @@ public void listenForOrderEvents() throws Exception {
96109
}
97110

98111
private void updateDataAndSendEventOnInventory(AQjmsSession session, String orderid, String itemid) throws Exception {
99-
100112
if (inventoryResource.crashAfterOrderMessageReceived) System.exit(-1);
101113
String inventorylocation = evaluateInventory(session, itemid);
102114
Inventory inventory = new Inventory(orderid, itemid, inventorylocation, "beer"); //static suggestiveSale - represents an additional service/event
115+
Span activeSpan = inventoryResource.getTracer().buildSpan("inventorylocation").asChildOf(inventoryResource.getTracer().activeSpan()).start();
116+
activeSpan.log("begin placing order"); // logs are for a specific moment or event within the span (in contrast to tags which should apply to the span regardless of time).
117+
activeSpan.setTag("orderid", orderid); //tags are annotations of spans in order to query, filter, and comprehend trace data
118+
activeSpan.setTag("itemid", itemid);
119+
activeSpan.setTag("inventorylocation", inventorylocation); // https://github.com/opentracing/specification/blob/master/semantic_conventions.md
120+
activeSpan.setTag("dbConnection.getMetaData()", dbConnection.getMetaData().toString()); // https://github.com/opentracing/specification/blob/master/semantic_conventions.md
121+
activeSpan.setBaggageItem("sagaid", "testsagaid" + orderid); //baggage is part of SpanContext and carries data across process boundaries for access throughout the trace
122+
activeSpan.setBaggageItem("orderid", orderid);
123+
activeSpan.setBaggageItem("inventorylocation", inventorylocation);
103124
String jsonString = JsonUtils.writeValueAsString(inventory);
104125
Topic inventoryTopic = session.getTopic(InventoryResource.inventoryuser, InventoryResource.inventoryQueueName);
105126
System.out.println("send inventory status message... jsonString:" + jsonString + " inventoryTopic:" + inventoryTopic);
106127
if (inventoryResource.crashAfterOrderMessageProcessed) System.exit(-1);
107128
TextMessage objmsg = session.createTextMessage();
108-
TopicPublisher publisher = session.createPublisher(inventoryTopic);
129+
// TopicPublisher publisher = session.createPublisher(inventoryTopic);
130+
TracingMessageProducer producer = new TracingMessageProducer(session.createPublisher(inventoryTopic), inventoryResource.getTracer());
109131
objmsg.setIntProperty("Id", 1);
110132
objmsg.setIntProperty("Priority", 2);
111133
objmsg.setText(jsonString);
112-
objmsg.setJMSCorrelationID("" + 2);
134+
// objmsg.setJMSCorrelationID("" + 2);
113135
objmsg.setJMSPriority(2);
114-
publisher.publish(inventoryTopic, objmsg, DeliveryMode.PERSISTENT, 2, AQjmsConstants.EXPIRATION_NEVER);
136+
// publisher.publish(inventoryTopic, objmsg, DeliveryMode.PERSISTENT, 2, AQjmsConstants.EXPIRATION_NEVER);
137+
producer.send(inventoryTopic, objmsg, DeliveryMode.PERSISTENT, 2, AQjmsConstants.EXPIRATION_NEVER);
115138
}
116139

117140
private String evaluateInventory(AQjmsSession session, String id) throws JMSException, SQLException {

grabdish/inventory-helidon/src/main/java/io/helidon/data/examples/OCISDKUtility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
public class OCISDKUtility {
1717

1818
static String getSecreteFromVault(boolean isInstancePrincipal, String regionIdString, String secretOcid) {
19-
System.out.println("ATPAQAdminResource.getSecretFromVault isInstancePrincipal:" + isInstancePrincipal);
19+
System.out.println("OCISDKUtility.getSecretFromVault isInstancePrincipal:" + isInstancePrincipal);
2020
SecretsClient secretsClient = new SecretsClient(InstancePrincipalsAuthenticationDetailsProvider.builder().build());
2121
secretsClient.setRegion(regionIdString);
2222
GetSecretBundleRequest getSecretBundleRequest = GetSecretBundleRequest

0 commit comments

Comments
 (0)