Skip to content

Commit a0b5fba

Browse files
committed
Cleanup Examples and test configurations.
1 parent bef51d5 commit a0b5fba

File tree

19 files changed

+20
-1278
lines changed

19 files changed

+20
-1278
lines changed

README.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,13 @@ gradle javadoc
128128

129129
## Examples
130130

131-
Repository contains 7 common OKafka application examples in `examples` folder.
131+
Repository contains 2 common OKafka application examples in `examples` folder.
132132

133-
`1. CreateTopic.java` -
134-
Connects to Oracle Database and create a topic TXEQ with 10 partitions with default retention time of 7 days.
133+
`1. ProducerOKafka.java`
134+
Produces 10 messages into TxEQ topic.
135135

136-
`2. DeleteTopic.java`
137-
Deletes already created OKafka topic.
138-
139-
`3. SimpleProducer.java`
140-
Produces 100 messages into TxEQ topic.
141-
142-
`4. SimpleConsumer.java`
143-
Consumes 100 messages from TxEQ topic.
144-
145-
`5. TransactionalProducer.java`
146-
Retrieves the Oracle Database Connection object from OKafka producer. Atomically performs a DML operation and sends a record.
147-
148-
`6. TransactionalConsumer.java`
149-
Retrieves the Oracle Database Connection object from OKafka consumer. Atomically consumes a batch of records and perform DML operation for each record.
150-
151-
152-
`7. TransactionalProduceConsume.java`
153-
Atomically consumes a batch of messages from TXEQ topic using OKafka Consumer, processes records from the batch and produces them in the tpic TxEQ_2 using OKafka Producer. To achieve atomicity for this these consume-process-produce operations, application retrieves the Oracle Database Connection object from OKafka Consumer and pass it to create an OKafka Producer.
136+
`2. ConsumerOKafka.java`
137+
Consumes 10 messages from TxEQ topic.
154138

155139
## Kafka Java Client APIs supported
156140

build.gradle

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -203,85 +203,6 @@ project(':examples:producer') {
203203
}
204204
}
205205

206-
project(':examples:TxProducer') {
207-
apply plugin : 'java'
208-
apply plugin : 'application'
209-
210-
sourceCompatibility = minJavaVersion
211-
targetCompatibility = minJavaVersion
212-
213-
dependencies {
214-
// These dependencies are used by the application.
215-
implementation project(':clients')
216-
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '23.4.0.24.05'
217-
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.7.1'
218-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.6'
219-
}
220-
221-
tasks.named('jar') {
222-
description('Generates OKafka Transactional Producer jar ')
223-
archiveBaseName = 'okafka'
224-
archiveClassifier = 'txproducer'
225-
226-
from "${rootProject.projectDir}/LICENSE.txt"
227-
from "${rootProject.projectDir}/NOTICE"
228-
229-
manifest {
230-
attributes(
231-
'Implementation-Title' : 'OKafka Transactional Producer',
232-
'Implementation-Version': project.version
233-
)
234-
}
235-
}
236-
237-
tasks.named('run') {
238-
description('Run OKafka Transactional Producer')
239-
application {
240-
mainClass = 'org.oracle.okafka.examples.TransactionalProducerOKafka'
241-
}
242-
}
243-
}
244-
245-
project(':examples:TxConsumer') {
246-
apply plugin : 'java'
247-
apply plugin : 'application'
248-
249-
sourceCompatibility = minJavaVersion
250-
targetCompatibility = minJavaVersion
251-
252-
dependencies {
253-
// These dependencies are used by the application.
254-
implementation project(':clients')
255-
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '23.4.0.24.05'
256-
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.7.1'
257-
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.6'
258-
}
259-
260-
261-
tasks.named('jar') {
262-
description('Generates OKafka Transactional Consumer jar ')
263-
archiveBaseName = 'okafka'
264-
archiveClassifier = 'txconsumer'
265-
266-
from "${rootProject.projectDir}/LICENSE.txt"
267-
from "${rootProject.projectDir}/NOTICE"
268-
269-
manifest {
270-
attributes(
271-
'Implementation-Title' : 'OKafka Transactional Consumer',
272-
'Implementation-Version': project.version
273-
)
274-
}
275-
}
276-
277-
tasks.named('run') {
278-
description('Run OKafka Transactional Consumer')
279-
application {
280-
mainClass = 'org.oracle.okafka.examples.TransactionalConsumerOKafka'
281-
}
282-
}
283-
}
284-
285206
configurations {
286207
childJar
287208
}

examples/TxConsumer/src/main/java/org/oracle/okafka/examples/TransactionalConsumerOKafka.java

Lines changed: 0 additions & 172 deletions
This file was deleted.

examples/TxConsumer/src/main/resources/config.properties

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)