-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AisStore archiver with incoming UDP instead of TCP #1
Comments
The source passing is done in this function https://github.com/dma-ais/AisLib/blob/master/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisReaders.java There is a AisUdpReader class that can be used instead of AisTcpReader. But it should be fairly easy for you to modify that method to instantiate a AisUdpReader instead of a AisTcpReader. And just compile a new jar |
So, if I understand you correctly, we have to find that AisReaders.java file and change Tcp to Udp in the lines you have mentioned? We have cloned the repository and installed it using mvn. That mvn install command provides us the jar that we can execute, correct? The AisReaders.java is not included in the AisStore-repository as far as I know, so how can I change Tcp to Udp before the jar is compiled? I have already installed a Java decompiler, but that doesn't allow me to change the file :( |
No reason to decompile anything. And build AisStore again. |
There is just one thing I do not understand and that is how we edit that AisReaders file. We do not clone the AisLib repo, that is done automatically when we do I have never worked with Java before, so this is all new to me. I try to understand and search for things I might need, but I do not have found anything relevant for me. |
No problem
replace https://github.com/dma-ais/AisLib/blob/master/ais-lib-communication/src/main/java/dk/dma/ais/reader/AisReaders.java using your favorite editor
You should have a new executable jar in ais-store-cli/target |
Thanks for your reply! We will try to change the AisReaders file so it works with UDP today and I will let you know if it is successfull or not. I really appreciate your support, I don't think we could fix it by myself! |
Alright, we have changed line 182-210 as following:
After that, we have installed using Maven,
Any idea how to fix this or did we miss something really important? |
Hi there,
We are using the archiver to save AIS data into a Cassandra cluster. To launch the archiver, we are using the following command:
java -jar ais-store-cli-0.4-SNAPSHOT.jar archive src=127.0.0.1:1337
The data is forwarded to our server on UDP port 1337. If we enter the code above, we are receiving the next error:
The error suggests that the archiver is using a TCP-connection, but we receive our data on UDP (port 1337). Is there any possibility to receive data on UDP instead of TCP?
Kind regards,
The text was updated successfully, but these errors were encountered: