All Projects → withlin → Commonx

withlin / Commonx

基础框架

Projects that are alternatives of or similar to Commonx

Surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service gove…
Stars: ✭ 3,088 (+5317.54%)
Mutual labels:  zookeeper, kafka, redis, rabbitmq
Full Stack Notes
全栈工程师手册
Stars: ✭ 366 (+542.11%)
Mutual labels:  zookeeper, kafka, redis, rabbitmq
Cookbook
🎉🎉🎉JAVA高级架构师技术栈==任何技能通过 “刻意练习” 都可以达到融会贯通的境界,就像烹饪一样,这里有一份JAVA开发技术手册,只需要增加自己练习的次数。🏃🏃🏃
Stars: ✭ 428 (+650.88%)
Mutual labels:  zookeeper, kafka, redis, rabbitmq
Springboot Templates
springboot和dubbo、netty的集成,redis mongodb的nosql模板, kafka rocketmq rabbit的MQ模板, solr solrcloud elasticsearch查询引擎
Stars: ✭ 100 (+75.44%)
Mutual labels:  zookeeper, kafka, redis, rabbitmq
Nagios Plugins
450+ AWS, Hadoop, Cloud, Kafka, Docker, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Cloudera etc...
Stars: ✭ 1,000 (+1654.39%)
Mutual labels:  zookeeper, kafka, redis, rabbitmq
Superman
Superman是什么:构建Java 高级开发技术的知识体系,从基础不断打怪升级成为超人之路(更新中.......)
Stars: ✭ 106 (+85.96%)
Mutual labels:  zookeeper, kafka, redis, rabbitmq
Dockerfiles
50+ DockerHub public images for Docker & Kubernetes - Hadoop, Kafka, ZooKeeper, HBase, Cassandra, Solr, SolrCloud, Presto, Apache Drill, Nifi, Spark, Consul, Riak, TeamCity and DevOps tools built on the major Linux distros: Alpine, CentOS, Debian, Fedora, Ubuntu
Stars: ✭ 847 (+1385.96%)
Mutual labels:  zookeeper, kafka, rabbitmq
Dis Seckill
👊SpringBoot+Zookeeper+Dubbo打造分布式高并发商品秒杀系统
Stars: ✭ 315 (+452.63%)
Mutual labels:  zookeeper, redis, rabbitmq
Szt Bigdata
深圳地铁大数据客流分析系统🚇🚄🌟
Stars: ✭ 826 (+1349.12%)
Mutual labels:  zookeeper, kafka, redis
Zenko
Zenko is the open source multi-cloud data controller: own and keep control of your data on any cloud.
Stars: ✭ 353 (+519.3%)
Mutual labels:  zookeeper, kafka, redis
Thunder
⚡️ Nepxion Thunder is a distribution RPC framework based on Netty + Hessian + Kafka + ActiveMQ + Tibco + Zookeeper + Redis + Spring Web MVC + Spring Boot + Docker 多协议、多组件、多序列化的分布式RPC调用框架
Stars: ✭ 204 (+257.89%)
Mutual labels:  zookeeper, kafka, redis
Springboot Learning
基于Gradle构建,使用SpringBoot在各个场景的应用,包括集成消息中间件、前后端分离、数据库、缓存、分布式锁、分布式事务等
Stars: ✭ 340 (+496.49%)
Mutual labels:  kafka, redis, rabbitmq
Gnomock
Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻
Stars: ✭ 398 (+598.25%)
Mutual labels:  kafka, redis, rabbitmq
Zheng
基于Spring+SpringMVC+Mybatis分布式敏捷开发系统架构,提供整套公共微服务服务模块:集中权限管理(单点登录)、内容管理、支付中心、用户管理(支持第三方登录)、微信平台、存储系统、配置中心、日志分析、任务和通知等,支持服务治理、监控和追踪,努力为中小型企业打造全方位J2EE企业级开发解决方案。
Stars: ✭ 16,163 (+28256.14%)
Mutual labels:  zookeeper, redis, quartz
Meiam.system
.NET 5 / .NET Core 3.1 WebAPI + Vue 2.0 + RBAC 企业级前后端分离权限框架
Stars: ✭ 340 (+496.49%)
Mutual labels:  redis, quartz, rabbitmq
Springboot Learn
🌹springboot常用框架整合示例,涉及多种网站监控,数据缓存,网络通信,持久层,权限管理,常用工具等
Stars: ✭ 270 (+373.68%)
Mutual labels:  redis, quartz, rabbitmq
Testcontainers Spring Boot
Container auto-configurations for spring-boot based integration tests
Stars: ✭ 460 (+707.02%)
Mutual labels:  kafka, redis, rabbitmq
Dnc
dnc 去中心化 开源社区 轻联盟 dncto.com QQ群 779699538
Stars: ✭ 551 (+866.67%)
Mutual labels:  kafka, redis, rabbitmq
Operators
Collection of Kubernetes Operators built with KUDO.
Stars: ✭ 175 (+207.02%)
Mutual labels:  zookeeper, kafka, redis
Firecamp
Serverless Platform for the stateful services
Stars: ✭ 194 (+240.35%)
Mutual labels:  zookeeper, kafka, redis

CommonX

Getting Started

namespace ServiceBus.TestPublish.NetCore
{
    using CommonX.Components;
    using CommonX.Configurations;
    using CommonX.Logging;
    using System;
    using System.Reflection;
    using CommonX.ServiceBus.MassTransit.Configuration;
    using CommonX.ServiceBus;
    using CommonX.Log4Net;
    using CommonX.RabbitMQ;
    using CommonX.Kafka;
    using CommonX.EventBus.Events;
    using CommonX.EventBus.Abstractions;
    using Confluent.Kafka;
    using System.Threading.Tasks;
    using System.Collections.Generic;
    using CommonX.Quartz;
    using CommonX.Cache.Redis;

    public class RequestIntegrationEvent : IntegrationEvent
    {
        public string Message { get; set; }
    }
    public class RequestIntegrationEventHandler : IIntegrationEventHandler<RequestIntegrationEvent>
    {
        public async Task Handle(RequestIntegrationEvent @event)
        {
            Console.WriteLine(@event.Id);
            Console.WriteLine(@event.CreationDate);
            Console.WriteLine(@event.Message);
            Console.WriteLine(@event.Id);
            await Task.FromResult(0);
        }
    }

    class Program
    {
        private static IBus _bus;
        private static ILogger _logger;
        private static IConnectionPool _conn;
        private static IConsumerClientFactory factory;
        private static IKafkaPersisterConnection _consumerClient;
        private static void HandlerMessage(Message<string, string> msg)
        {
            Console.WriteLine($"消息的值为{msg.Value}");
        }
        static void Main(string[] args)
        {
            Setup();
            Console.WriteLine();
            List<string> topics = new List<string>();
            topics.Add("test");
            _consumerClient.Consume(topics, HandlerMessage);



            _bus.Send("ServiceBus.TestPublish.NetCore", new RequestIntegrationEvent() { Message = "Masstransit test Succees!" });
            _logger.Info("ServiceBus Logs test!!");
            Console.WriteLine("Masstransit test Succees!");
            Console.ReadKey();
        }

        public static void Setup()
        {
            var assambly = Assembly.GetAssembly(typeof(Program));
            var config = Configuration.Create()
                .UseAutofac()
                .RegisterCommonComponents()
                .UseLog4Net()
                .UseJsonNet()
                .UseQuartz(new Assembly[] { assambly })
                .UseRabbitMQ(x=> 
                {
                    x.HostName = "localhost";
                    x.Port = 5067;
                    x.VirtualHost = "/";
                    x.UserName = "guest";
                    x.Password = "guest";
                    x.AutomaticRecoveryEnabled = true;
                    x.RequestedConnectionTimeout = 20000;
                })
                .UseRedisCache()
                .UseMassTransit(new Assembly[] { assambly })
                .UseKafka("");

            using (var scope = ObjectContainer.Current.BeginLifetimeScope())
            {
                _logger = scope.Resolve<ILoggerFactory>().Create(typeof(Program).Name);
                _bus = scope.Resolve<IBus>();
                _conn = scope.Resolve<IConnectionPool>();
                factory = scope.Resolve<IConsumerClientFactory>();
                _consumerClient = scope.Resolve<IKafkaPersisterConnection>();
            }
        }
    }
}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].