Skip to content
Advertisement

Tag: spring

Synchronous publish for rabbitmq

I want to have two sets API for the clients to publish messages sync send(no retry, fail immediately and send status back to the clients synchronously) async send (publisher and confirm callback, with retry, log and drop the message after certain retries). I am able to implement this by enabling confirm and return. Is there any way to implement Synchronous

Spring Integration file only once from SFTP across several sessions

I have a Spring Integration WorkFlow which downloads files from a SFTP directory. This is done with a RemoteFileInboundChannelAdapterSpec and IntegrationFlows. Spring Integration remembers within a session which files it has already downloaded, can I do this across sessions e.g. through a database and if so how? Answer It is done not within the session, but by some specific FileListFilter

Use batch mode for dynamic listener

I am using a dynamic message listener. An example is shown below. I want to convert this to a batch listener (consume multiple messages at once). Is there a way to convert this, so that the listener consumes a list of consumer records? I am using spring-kafka with spring-boot. Thanks in advance Answer Implement BatchAcknowledgingConsumerAwareMessageListener instead.

How to check UUID null value in JPQL?

I am using JPA/Hibernate. So I wanna to do nullCheck in JPQL, but when I do that it does not determine dataType. JPQL Query: EXCEPTION: Caused by: org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:103) at jdk.internal.reflect.GeneratedMethodAccessor582.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)

Running a Java configured Spring MVC Application fails to load ApplicationContext, raises java.lang.reflect.InaccessibleObjectException

Environment Eclipse IDE for Enterprise Web applications Tomcat 9 Server Code I started learning spring, following a Udemy course (by Chad Darby). In it, a spring mvc app is configured in java. Relevant files are given below: DemoAppConfig.java MySpringMvcDispatcherServletInitializer.java pom.xml Error While running the web app on tomcat 9 server from eclipse, the following exception is raised: Why is it

Multiple boolean values in if else statement is always false in Java

I am stuck to this method because of the if else condition says that Condition usersInSales && usersInPayments is always false Condition usersInSales && usersInLoans is always false Condition usersInPayments && usersInLoans is always false I tried different condition combinations and added the false values to try resolve it but it didn’t help. Please can I have some help? Thanks

Advertisement