Merge pull request #219 from pymma/kafka

work
This commit is contained in:
Nicolas Héron 2021-02-02 10:02:52 +01:00 committed by GitHub
commit 1b56bfda8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 36 additions and 17 deletions

View file

@ -357,10 +357,10 @@
<configuration>
<!--registry>192.168.1.184:12500</registry-->
<dockerHost>${docker.Host}</dockerHost>
<!-- this is for Mac and Amazon Linux -->
<!--dockerHost>unix:///var/run/docker.sock</dockerHost-->
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<verbose>true</verbose>
<images>

View file

@ -76,6 +76,7 @@ public class DababaseContentUpdate {
User adminUser = userRepository.findByLogin("admin");
if (adminUser == null) {
this.initDatabase();
this.synchronizeDatabaseWithWorkbenches();
} else {
this.synchronizeDatabaseWithWorkbenches();
}
@ -98,19 +99,26 @@ public class DababaseContentUpdate {
userGroupsRepository.save(new UserGroups(UUID.randomUUID().toString(), "demogroup"));
User adminUser = new User(UUID.randomUUID().toString(), "admin", "adminadmin99#");
adminUser.getUserGroups().add(userGroupsRepository.findByName("kiemgmt"));
adminUser.getUserGroups().add(userGroupsRepository.findByName("admingroup"));
// adminUser.getUserGroups().add(userGroupsRepository.findByName("kiemgmt"));
// adminUser.getUserGroups().add(userGroupsRepository.findByName("admingroup"));
adminUser.getUserRoles().add(userRolesRepository.findByName("admin"));
adminUser.getUserRoles().add(userRolesRepository.findByName("rest-all"));
userRepository.save(adminUser);
User nheronUser = new User(UUID.randomUUID().toString(), "nheron", "adminnheron00@");
nheronUser.getUserGroups().add(userGroupsRepository.findByName("kiemgmt"));
nheronUser.getUserGroups().add(userGroupsRepository.findByName("admingroup"));
// nheronUser.getUserGroups().add(userGroupsRepository.findByName("kiemgmt"));
// nheronUser.getUserGroups().add(userGroupsRepository.findByName("admingroup"));
nheronUser.getUserRoles().add(userRolesRepository.findByName("admin"));
nheronUser.getUserRoles().add(userRolesRepository.findByName("rest-all"));
userRepository.save(nheronUser);
User apiUser = new User(UUID.randomUUID().toString(), "api-user", "api-user");
// nheronUser.getUserGroups().add(userGroupsRepository.findByName("kiemgmt"));
// nheronUser.getUserGroups().add(userGroupsRepository.findByName("admingroup"));
apiUser.getUserRoles().add(userRolesRepository.findByName("rest-all"));
userRepository.save(apiUser);
KieWorkbench mainWorkbench = new KieWorkbench();
mainWorkbench.setID(UUID.randomUUID().toString());
mainWorkbench.setName("demo");

View file

@ -183,7 +183,7 @@ public class GridRuntime extends Grid<RuntimePersist> {
filterDataProvider = dataProvider.withConfigurableFilter();
setDataProvider(filterDataProvider);
for (RuntimePersist runtimePersist : dataProvider.getItems()) {
if (projectPersist.getServerNames().contains(runtimePersist.getServerName())) {
if (projectPersist!= null && projectPersist.getServerNames().contains(runtimePersist.getServerName())) {
selectionModel.select(runtimePersist);
}
}

View file

@ -236,8 +236,7 @@
<configuration>
<!--registry>192.168.1.184:12500</registry-->
<dockerHost>${docker.Host}</dockerHost>
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<!-- this is for Mac and Amazon Linux -->
<!--dockerHost>unix:///var/run/docker.sock</dockerHost-->

View file

@ -245,7 +245,7 @@
<configuration>
<!--registry>192.168.1.184:12500</registry-->
<dockerHost>${docker.Host}</dockerHost>
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<!-- this is for Mac and Amazon Linux -->
<!--dockerHost>unix:///var/run/docker.sock</dockerHost-->

View file

@ -101,7 +101,7 @@
<configuration>
<!--registry>192.168.1.184:12500</registry-->
<dockerHost>${docker.Host}</dockerHost>
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<!-- this is for Mac and Amazon Linux -->
<!--dockerHost>unix:///var/run/docker.sock</dockerHost-->

View file

@ -77,6 +77,7 @@ public class DroolsBusinessIndexerServer {
props.put(ConsumerConfig.GROUP_ID_CONFIG, groupID);
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JsonDeserializer.class);
props.put(ConsumerConfig.FETCH_MAX_BYTES_CONFIG, 4655826);
if (activateSsl) {
props.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, SecurityProtocol.SSL.name);
props.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, this.sslTruststoreLocation);
@ -103,6 +104,7 @@ public class DroolsBusinessIndexerServer {
* Main method to start the application.
*/
public static void main(String[] args) {
System.setProperty(ConsumerConfig.FETCH_MAX_BYTES_CONFIG, "41943040");
SpringApplication.run(DroolsBusinessIndexerServer.class, args);
}

View file

@ -232,7 +232,7 @@
<configuration>
<!--registry>192.168.1.184:12500</registry-->
<dockerHost>${docker.Host}</dockerHost>
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<!-- this is for Mac and Amazon Linux -->
<!--dockerHost>unix:///var/run/docker.sock</dockerHost-->

View file

@ -22,6 +22,7 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.apache.kafka.clients.CommonClientConfigs;
import org.apache.kafka.clients.admin.AdminClientConfig;
import org.apache.kafka.clients.admin.NewTopic;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.config.SslConfigs;
import org.apache.kafka.common.security.auth.SecurityProtocol;
@ -116,6 +117,9 @@ public class DroolsBusinessProxyServer {
configProps.put(
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
JsonSerializer.class);
configProps.put(
ProducerConfig.MAX_REQUEST_SIZE_CONFIG, 4655826);
if (activateSsl) {
configProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, SecurityProtocol.SSL.name);
configProps.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, this.sslTruststoreLocation);
@ -143,6 +147,8 @@ public class DroolsBusinessProxyServer {
configProps.put(
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
JsonSerializer.class);
configProps.put(
ProducerConfig.MAX_REQUEST_SIZE_CONFIG,"41943040");
if (activateSsl) {
configProps.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, SecurityProtocol.SSL.name);
configProps.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, this.sslTruststoreLocation);
@ -184,6 +190,7 @@ public class DroolsBusinessProxyServer {
e.printStackTrace();
}
}
System.setProperty(ConsumerConfig.FETCH_MAX_BYTES_CONFIG, "41943040");
SpringApplication.run(DroolsBusinessProxyServer.class, args);
}

View file

@ -56,8 +56,12 @@ public class RuleService {
}
}
chtijbugObjectRequest.setTransactionEndTimeStamp(LocalDateTime.now());
kafkaTemplateLogging.send(KafkaTopicConstants.LOGING_TOPIC,chtijbugObjectRequest);
return chtijbutObjectResponse.getObjectRequest();
try {
kafkaTemplateLogging.send(KafkaTopicConstants.LOGING_TOPIC,chtijbugObjectRequest);
}catch (Exception e){
logger.error(" kafkaTemplateLogging.send",e);
}
return chtijbutObjectResponse.getObjectRequest();
}
}

View file

@ -130,8 +130,7 @@
<configuration>
<!--registry>192.168.1.184:12500</registry-->
<dockerHost>${docker.Host}</dockerHost>
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<!-- this is for Mac and Amazon Linux -->
<!--dockerHost>unix:///var/run/docker.sock</dockerHost-->

View file

@ -18,7 +18,7 @@
<properties>
<fabri8.plugin.version>0.34.1</fabri8.plugin.version>
<jbpm.version>7.46.0.Final</jbpm.version>
<jbpm.version>7.47.0.Final</jbpm.version>
<node.version>v10.16.3</node.version>
<npm.version>6.11.3</npm.version>
<frontend-maven-plugin.version>1.8.0</frontend-maven-plugin.version>