Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
daffd7d
Bump node-uuid from 1.4.3 to 1.4.8 in /src/client/nodejs
dependabot[bot] Apr 16, 2020
1412bcd
[Issue-52] Improve tests
gaol Apr 13, 2020
5db74ed
Update parent pom version
vietj May 11, 2020
c3cae00
Releasing 4.0.0-milestone5
vietj May 28, 2020
81672a3
Releasing 4.0.0-SNAPSHOT
vietj May 28, 2020
b618eef
Security Update
razzbee May 28, 2020
374f375
Releasing 4.0.0.Beta1
vietj Jul 23, 2020
a8f1e6e
Releasing 4.0.0-SNAPSHOT
vietj Jul 23, 2020
0a012fd
Update pom parent version
vietj Aug 20, 2020
b86c537
Releasing 4.0.0.Beta2
vietj Sep 2, 2020
7e106f4
Releasing 4.0.0-SNAPSHOT
vietj Sep 2, 2020
d5e43f6
Releasing 4.0.0.Beta3
vietj Sep 17, 2020
bb397d1
Releasing 4.0.0-SNAPSHOT
vietj Sep 17, 2020
c1ccb17
Bump junit from 4.12 to 4.13.1
dependabot[bot] Oct 13, 2020
1112ebd
Releasing 4.0.0.CR1
vietj Nov 1, 2020
ffa579a
Releasing 4.0.0-SNAPSHOT
vietj Nov 1, 2020
d44b18f
GitHub action CI
vietj Nov 19, 2020
23b2d94
Releasing 4.0.0.CR2
vietj Nov 23, 2020
43c9ce9
Releasing 4.0.0-SNAPSHOT
vietj Nov 23, 2020
9124d51
Remove junit publish action that can't work with PR from forkeks
vietj Nov 23, 2020
88f5fa9
Cleanup useless travis CI files
vietj Nov 23, 2020
7ba85c4
Update CI badge
vietj Nov 23, 2020
26b81ca
Remove Maven repository caching from CI action
vietj Dec 2, 2020
401c31f
Deploy SNAPSHOT on cron GitHub events
vietj Dec 2, 2020
0356e1e
Fix missing future methods
vietj Dec 6, 2020
7fe2302
Releasing 4.0.0
vietj Dec 7, 2020
98b3dcc
Releasing 4.0.1-SNAPSHOT
vietj Dec 7, 2020
90b3d8d
Releasing 4.0.1
vietj Feb 3, 2021
e5fd43c
Releasing 4.0.2-SNAPSHOT
vietj Feb 3, 2021
9f73aea
Releasing 4.0.2
vietj Feb 5, 2021
d0b984c
Releasing 4.0.3-SNAPSHOT
vietj Feb 5, 2021
f20bb2b
Configure new distribution infrastructure
vietj Feb 17, 2021
912748d
Releasing 4.0.3
vietj Mar 12, 2021
1a1cebd
Releasing 4.0.4-SNAPSHOT
vietj Mar 12, 2021
dc29fdb
Set version to 4.1.0-SNAPSHOT
vietj Mar 30, 2021
b3fd5a2
Fix build status link in README.md
gaol Apr 13, 2021
3134db7
Releasing 4.1.0.Beta1
vietj May 7, 2021
ff45651
Releasing 4.1.0-SNAPSHOT
vietj May 7, 2021
02a6cc8
Releasing 4.1.0.CR1
vietj May 20, 2021
d1a181a
Releasing 4.1.0-SNAPSHOT
vietj May 20, 2021
ab18ea3
Releasing 4.1.0.CR2
vietj May 27, 2021
176b6fb
Releasing 4.1.0-SNAPSHOT
vietj May 27, 2021
b9dae47
Releasing 4.1.0
vietj Jun 1, 2021
92f7b99
Releasing 4.1.1-SNAPSHOT
vietj Jun 1, 2021
4145e8f
Releasing 4.1.1
vietj Jul 1, 2021
7338b74
Set version to 4.2.0-SNAPSHOT
vietj Jul 1, 2021
a0f0280
true
vietj Aug 10, 2021
d70f774
Update CI/CD actions
vietj Aug 10, 2021
28dffcc
Releasing 4.2.0.Beta1
vietj Aug 24, 2021
dc18cb1
Back to snapshots
vietj Aug 24, 2021
fdc47bd
Fix #61: message body should not be locked to JSON Object
pmlopes Sep 3, 2021
25dd4ff
Update CI to run with JDK 17 instead of JDK 11
vietj Sep 23, 2021
7e3e3ec
Adapt to Java 17
vietj Sep 23, 2021
9b36ae4
Releasing 4.2.0.CR1
vietj Oct 19, 2021
8362bf6
Releasing 4.2.0-SNAPSHOT
vietj Oct 19, 2021
b9ba31b
Releasing 4.2.0
vietj Oct 28, 2021
0020b27
Releasing 4.2.1-SNAPSHOT
vietj Oct 28, 2021
faf0fd7
Jsonrcp-WIP: Initialised client sending message not expecting a respo…
nbrendah Oct 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/maven-cd-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!--
~ Copyright (c) 2021 Red Hat, Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<settings>

<interactiveMode>false</interactiveMode>

<servers>
<server>
<id>vertx-snapshots-repository</id>
<username>${env.VERTX_NEXUS_USERNAME}</username>
<password>${env.VERTX_NEXUS_PASSWORD}</password>
</server>
</servers>

<profiles>
<profile>
<id>google-mirror</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror EU</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
55 changes: 55 additions & 0 deletions .github/maven-ci-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!--
~ Copyright (c) 2021 Red Hat, Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<settings>

<interactiveMode>false</interactiveMode>

<profiles>
<profile>
<id>google-mirror</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror EU</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI
on:
push:
branches:
- master
- '[0-9]+.[0-9]+'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+'
schedule:
- cron: '0 4 * * *'
jobs:
Test:
name: Run tests
strategy:
matrix:
os: [ubuntu-latest]
jdk: [8, 17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
- name: Run tests
run: mvn -s .github/maven-ci-settings.xml -q clean verify -B
Deploy:
name: Deploy to OSSRH
if: ${{ github.repository_owner == 'vert-x3' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: Test
runs-on: ubuntu-latest
env:
VERTX_NEXUS_USERNAME: ${{ secrets.VERTX_NEXUS_USERNAME }}
VERTX_NEXUS_PASSWORD: ${{ secrets.VERTX_NEXUS_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: 8
distribution: temurin
- name: Get project version
run: echo "PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -B | grep -v '\[')" >> $GITHUB_ENV
- name: Maven deploy
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') }}
run: mvn deploy -s .github/maven-cd-settings.xml -DskipTests -B
5 changes: 0 additions & 5 deletions .travis.deploy.artifacts.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .travis.maven.settings.xml

This file was deleted.

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vertx-tcp-eventbus-bridge

[![Build Status](https://travis-ci.org/vert-x3/vertx-tcp-eventbus-bridge.svg?branch=master)](https://travis-ci.org/vert-x3/vertx-tcp-eventbus-bridge)
[![Build Status](https://github.com/vert-x3/vertx-tcp-eventbus-bridge/workflows/CI/badge.svg?branch=master)](https://github.com/vert-x3/vertx-tcp-eventbus-bridge/actions?query=workflow%3ACI)

This is a TCP eventbus bridge implementation.

Expand Down Expand Up @@ -34,7 +34,7 @@ It is the response to the `ping` request from client to bridge.
For a regular message, the object will also contain:

* `address`: (string, required) Destination address.
* `body`: (object, required) Message content as a JSON object.
* `body`: (any, required) Message content as a JSON valid type.
* `headers`: (object, optional) Headers as a JSON object with String values.
* `replyAddress`: (string, optional) Address for replying to.
* `send`: (boolean, required) Will be `true` if the message is a send, `false` if a publish.
Expand All @@ -54,7 +54,7 @@ type is shown below, along with the companion keys for that type:
#### `type: "send"`, `type: "publish"`

* `address`: (string, required) Destination address
* `body`: (object, required) Message content as a JSON object.
* `body`: (any, required) Message content as a JSON valid type.
* `headers`: (object, optional) Headers as a JSON object with String values.
* `replyAddress`: (string, optional) Address for replying to.

Expand Down
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
<parent>
<groupId>io.vertx</groupId>
<artifactId>vertx-ext-parent</artifactId>
<version>34</version>
<version>38</version>
</parent>

<artifactId>vertx-tcp-eventbus-bridge</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.2.1-SNAPSHOT</version>

<name>Vert.x TCP EventBus Bridge</name>

<properties>
<stack.version>4.0.0-SNAPSHOT</stack.version>
<stack.version>4.2.1-SNAPSHOT</stack.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -77,12 +77,18 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.12</version>
<version>4.13.1</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-unit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.65</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/client/nodejs/lib/tcp-vertx-eventbus.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function send(transport, message) {
message = Buffer.from(message, "utf-8");
var msgLen = message.length;

var buffer = new Buffer(4);
var buffer = Buffer.alloc(4);
buffer.writeInt32BE(msgLen, 0);

transport.write(Buffer.concat([buffer, message], 4 + msgLen));
Expand Down Expand Up @@ -101,7 +101,7 @@ var EventBus = function (host, port, options) {
this.onerror = console.error;

// message buffer
var buffer = new Buffer(0);
var buffer = Buffer.alloc(0);
var len = 0;

this.transport.on('close', function () {
Expand Down
2 changes: 1 addition & 1 deletion src/client/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vertx3-eventbus-client",
"description": "Vert.x3 TCP event bus client",
"dependencies": {
"node-uuid": "1.4.3"
"node-uuid": "1.4.8"
},
"devDependencies": {
"mocha": "2.3.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.vertx.codegen.annotations.Fluent;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.net.NetServerOptions;
Expand Down Expand Up @@ -49,10 +50,9 @@ static TcpEventBusBridge create(Vertx vertx, BridgeOptions options, NetServerOpt
/**
* Listen on default port 7000
*
* @return self
* @return a future of the result
*/
@Fluent
TcpEventBusBridge listen();
Future<TcpEventBusBridge> listen();

/**
* Listen on default port 7000 with a handler to report the state of the socket listen operation.
Expand All @@ -69,10 +69,9 @@ static TcpEventBusBridge create(Vertx vertx, BridgeOptions options, NetServerOpt
* @param port tcp port
* @param address tcp address to the bind
*
* @return self
* @return a future of the result
*/
@Fluent
TcpEventBusBridge listen(int port, String address);
Future<TcpEventBusBridge> listen(int port, String address);

/**
* Listen on specific port and bind to specific address
Expand All @@ -91,10 +90,9 @@ static TcpEventBusBridge create(Vertx vertx, BridgeOptions options, NetServerOpt
*
* @param port tcp port
*
* @return self
* @return a future of the result
*/
@Fluent
TcpEventBusBridge listen(int port);
Future<TcpEventBusBridge> listen(int port);

/**
* Listen on specific port
Expand All @@ -116,6 +114,8 @@ static TcpEventBusBridge create(Vertx vertx, BridgeOptions options, NetServerOpt

/**
* Close the current socket.
*
* @return a future of the result
*/
void close();
Future<Void> close();
}
Loading