This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Feature: AMQP Messages #119
Closed
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5f32d29
Setup for sendTransaction
e020dad
Update rpcProvider
64694a6
Send transaction version bump
2577040
Temp remove ProcessedTransactionResponse
9a4e038
Add isAmqpRequest field to SendTransactionRequest
5721310
Add serialized
3f3591a
Bump version
bb72d8c
Default to true for amqp
099af25
More AMQP config
ac203f3
AMQP interface/config
c1c14a0
Update session/processor to use amqpProvider
66227bd
Merge branch 'add-send-transaction' into feature/amqp-provider
dac75f7
Add completable/blocking
07a6d3c
Java doc
8fcfb7d
Update AMQP provider to just pass a string, prefixed with unsigned 0 …
e3bcd6e
Single completable
9a20e5d
Add error messages and queue process. Update interfaces
a2b5be2
Delete AMQP Config
b70e57b
Remove all references to PushTransaction
18da11d
Bump version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...va/one/block/eosiojava/error/serializationProvider/DeserializePackedTransactionError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package one.block.eosiojava.error.serializationProvider; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* Error class is used when there is an exception while attempting to call deserializeTransaction() | ||
* of Serialization Provider | ||
*/ | ||
public class DeserializePackedTransactionError extends SerializationProviderError { | ||
|
||
public DeserializePackedTransactionError() { | ||
} | ||
|
||
public DeserializePackedTransactionError(@NotNull String message) { | ||
super(message); | ||
} | ||
|
||
public DeserializePackedTransactionError(@NotNull String message, | ||
@NotNull Exception exception) { | ||
super(message, exception); | ||
} | ||
|
||
public DeserializePackedTransactionError(@NotNull Exception exception) { | ||
super(exception); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...java/one/block/eosiojava/error/serializationProvider/SerializePackedTransactionError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package one.block.eosiojava.error.serializationProvider; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* Error class is used when there is an exception while attempting to call serializeTransaction() of | ||
* Serialization Provider | ||
*/ | ||
public class SerializePackedTransactionError extends SerializationProviderError { | ||
|
||
public SerializePackedTransactionError() { | ||
} | ||
|
||
public SerializePackedTransactionError(@NotNull String message) { | ||
super(message); | ||
} | ||
|
||
public SerializePackedTransactionError(@NotNull String message, | ||
@NotNull Exception exception) { | ||
super(message, exception); | ||
} | ||
|
||
public SerializePackedTransactionError(@NotNull Exception exception) { | ||
super(exception); | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
...java/src/main/java/one/block/eosiojava/error/session/TransactionPushTransactionError.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
.../src/main/java/one/block/eosiojava/error/session/TransactionSendAmqpTransactionError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package one.block.eosiojava.error.session; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* Error class is used when there is an exception while attempting to call sendTransaction() of TransactionProcessor | ||
*/ | ||
public class TransactionSendAmqpTransactionError extends TransactionProcessorError { | ||
|
||
public TransactionSendAmqpTransactionError() { | ||
} | ||
|
||
public TransactionSendAmqpTransactionError(@NotNull String message) { | ||
super(message); | ||
} | ||
|
||
public TransactionSendAmqpTransactionError(@NotNull String message, | ||
@NotNull Exception exception) { | ||
super(message, exception); | ||
} | ||
|
||
public TransactionSendAmqpTransactionError(@NotNull Exception exception) { | ||
super(exception); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...a/src/main/java/one/block/eosiojava/error/session/TransactionSendRpcTransactionError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package one.block.eosiojava.error.session; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* Error class is used when there is an exception while attempting to call sendTransaction() of TransactionProcessor | ||
*/ | ||
public class TransactionSendRpcTransactionError extends TransactionProcessorError { | ||
|
||
public TransactionSendRpcTransactionError() { | ||
} | ||
|
||
public TransactionSendRpcTransactionError(@NotNull String message) { | ||
super(message); | ||
} | ||
|
||
public TransactionSendRpcTransactionError(@NotNull String message, | ||
@NotNull Exception exception) { | ||
super(message, exception); | ||
} | ||
|
||
public TransactionSendRpcTransactionError(@NotNull Exception exception) { | ||
super(exception); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
eosiojava/src/main/java/one/block/eosiojava/interfaces/IAMQPProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package one.block.eosiojava.interfaces; | ||
|
||
import io.reactivex.Completable; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* The interface of AMQP provider. | ||
*/ | ||
public interface IAMQPProvider { | ||
|
||
/** | ||
* Sends an AMQP message to configured queue | ||
* | ||
* @param message the message to send to AMQP | ||
* @return the response from the queue that message was received | ||
*/ | ||
@NotNull | ||
Completable send(byte[] message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...java/src/main/java/one/block/eosiojava/models/amqpProvider/AMQPMessageFailedResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package one.block.eosiojava.models.amqpProvider; | ||
|
||
import one.block.eosiojava.models.rpcProvider.response.SendTransactionResponse; | ||
|
||
public class AMQPMessageFailedResponse extends SendTransactionResponse { | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
...ava/src/main/java/one/block/eosiojava/models/amqpProvider/AMQPMessageSuccessResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package one.block.eosiojava.models.amqpProvider; | ||
|
||
import one.block.eosiojava.models.rpcProvider.response.SendTransactionResponse; | ||
|
||
public class AMQPMessageSuccessResponse extends SendTransactionResponse { | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what version do we actually want to bump this to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undetermined at this point. Currently the next release is targeted toward eosio-2.1 features and amqp support is not scheduled to be part of that release. If there is a need for it @brandonfancher should be consulted to put it into the release plan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed to support our AMQP provider/plug-in, and we plan to use that on services in the near future so would like to merge this in @brandonfancher @opi-smccoole