apollo

How to disable security in activemq apollo

余生长醉 提交于 2020-01-17 03:22:07
问题 I have installed apollo 1.7.1 and using a broker with default setting. When I try to connect to this broker, got this error message. Authentication failed. Credentials=[] By default it comes with file based authentication setup. How can I disable this authentication? 来源: https://stackoverflow.com/questions/35133734/how-to-disable-security-in-activemq-apollo

配置迁移至Apollo服务

可紊 提交于 2020-01-16 12:14:49
一、背景 目前Java项目的配置信息是放置在SpringBoot的YML格式的文件中配置管理,但在运维时,假如项目的某个配置参数需要改动,并且希望立即生效,则当前的配置无法满足;假如这个配置参数可以修改,也希望是指定账户允许修改,只允许某些人修改;并且可以根据环境来读取配置信息。是的,没错,这些基本的操作都是apollo配置框架的特性。而且它的特性不止这一点,更多特性请看链接 10.4.4.1、Apollo框架 。apollo在国内也是受广大程序员们公认的开源服务框架排名第一的配置框架。 配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性: 场景 影响 降级 原因 某台config service下线 无影响 Config service无状态,客户端重连其它config service 所有config service下线 客户端无法读取最新配置,Portal无影响 客户端重启时,可以读取本地缓存配置文件 某台admin service下线 无影响 Admin service无状态,Portal重连其它admin service 所有admin service下线 客户端无影响,portal无法更新配置 某台portal下线 无影响 Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 全部portal下线 客户端无影响

Why is refetchQueries needed?

♀尐吖头ヾ 提交于 2020-01-16 08:41:15
问题 I am following a tutorial on GraphQL, in the video the author does not use refetchQueries for a deleteMutation and all works well with UI updates and mutation. But here in the project sandbox code is updated and refetchQuery is now used for this operatio on Job component -> line 20 -> deleteJob(): codeSandBox. I have this similar problem in my app that does not update the UI automatically without refetchQueries done everywhere. Shouldn't Apollo be applying automatically the cache of Apollo

GraphQLError: Syntax Error: Expected :, found {

别等时光非礼了梦想. 提交于 2020-01-14 18:48:49
问题 Here are my graphql queries / mutations. I'm getting the error: GraphQLError: Syntax Error: Expected :, found { I don't know which one of them is wrong. import gql from 'graphql-tag'; export const CategoriesQuery = gql` query categoriesQuery( $id: ID!, $country: String!, $name: String! ) { sections( id: $id, country: $country, name: $description ) { id, createdBy, createdDate, lastUpdate, name } } `; export const ItemsQuery = gql` query itemsQuery( $id: ID!, $category: String!, $url: String!,

GraphQLError: Syntax Error: Expected :, found {

纵然是瞬间 提交于 2020-01-14 18:48:39
问题 Here are my graphql queries / mutations. I'm getting the error: GraphQLError: Syntax Error: Expected :, found { I don't know which one of them is wrong. import gql from 'graphql-tag'; export const CategoriesQuery = gql` query categoriesQuery( $id: ID!, $country: String!, $name: String! ) { sections( id: $id, country: $country, name: $description ) { id, createdBy, createdDate, lastUpdate, name } } `; export const ItemsQuery = gql` query itemsQuery( $id: ID!, $category: String!, $url: String!,

refetchQueries in Mutation Component of React Apollo Client is not working?

我是研究僧i 提交于 2020-01-14 07:59:19
问题 I have a <Query /> in my Home.js file Home.js <Query query={GET_TODOS_BY_PRODUCT} variables={{ id: state.get("selectedProduct.id"), completed: true }} > {({ data: { product } }) => { return <Main todos={product.todos} hashtag={product.hashtag} />; }} </Query> In my Main.js file I have <Mutation /> component - Main.js <Mutation key={v4()} mutation={SWITCH_SELECTED_PRODUCT} refetchQueries={() => { console.log("refetchQueries", product.id); return { query: GET_TODOS_BY_PRODUCT, variables: { id:

React Apollo 2 with React Router. graphql HOC loading: true forever if I navigate

微笑、不失礼 提交于 2020-01-13 13:11:28
问题 This is the code: https://codesandbox.io/s/p90q6674qq I simply use: export default graphql(CURRENT_USER_QUERY)(Menu); on the Menu component and simply this code in App component: class App extends Component { render() { return ( <div> {/* <Menu /> */} <Route component={Menu} /> <Route exact path="/" component={Home} /> <Route path="/login" component={Login} /> </div> ); } } A bug? Where am I wrong? 来源: https://stackoverflow.com/questions/47733633/react-apollo-2-with-react-router-graphql-hoc

React Apollo 2 with React Router. graphql HOC loading: true forever if I navigate

久未见 提交于 2020-01-13 13:10:09
问题 This is the code: https://codesandbox.io/s/p90q6674qq I simply use: export default graphql(CURRENT_USER_QUERY)(Menu); on the Menu component and simply this code in App component: class App extends Component { render() { return ( <div> {/* <Menu /> */} <Route component={Menu} /> <Route exact path="/" component={Home} /> <Route path="/login" component={Login} /> </div> ); } } A bug? Where am I wrong? 来源: https://stackoverflow.com/questions/47733633/react-apollo-2-with-react-router-graphql-hoc

Apollo配置中心(一)架构演进

你离开我真会死。 提交于 2020-01-10 11:37:26
笔者在工作中遇到如下问题,随着程序功能越多,配置文件不断增加,一些功能的开关、服务器地址、接口地址、不同环境的一些配置文件不同,这些在每次发布不同环境、更新项目时都比较繁琐,后来学习微服务时接触到了Spring Cloud Config配置中心,用了一段时间发现比之前方便不少,但是还是比较繁琐和麻烦,而且功能还达不到生产级,只能小规模场景下使用,在中大规模企业场景下不建议采用。后来了解到携程Apollo配置中心,Apollo支持完善的管理界面,支持多环境,配置变更实时生效,权限和配置审计等多种生产级功能,而且在携程到微服务架构体系中也运用了这个,在国内众多互联网公司也有落地案例,就开始去接触了解。最后结合工作和学习的一些经验分享给大家Apollo的入门使用和一些走过的坑,本篇文章主要介绍了Apollo架构体系、Apollo运行原理、Apollo配置中心概念、特性简单介绍。 部分资料来源: 携程Apollo配置中心架构深度解析: https://www.cnblogs.com/davidwang456/articles/9154260.html Apollo配置中心简单介绍: https://blog.csdn.net/Michael_HM/article/details/79412461 推荐博客: Apollo架构体系、Apollo运行原理、Apollo配置中心简单介绍:

【Apollo播放器】源码分析之图片加载模式

倖福魔咒の 提交于 2020-01-10 11:08:28
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 图片加载有很多,部份都是使用LruCache、弱引用、软引用等编写的,其编目的就是优化内存、缓存、加载效果,不过,它们都是各有千秋,下面看看【Apollo播放器】它是对图片加载如何做的 它主要结构如下: ImageInfo - 图片信息相关 ImageCache - 图片缓存相关 ImageProvider -图片提供者相关(管理器) GetBitmapTask -图片下载任务 下面一一分析每个类的结构和使用 ImageInfo.java public class ImageInfo { //图像类型 //专辑(ablum), 艺术家(artist), 播放列表(playlist), 流派genre public String type; //图像来源 //lastfm - 来自网站 //file - 来自音频 //gallery - 来自相册 //first_avail - 来自 'file' 或 'lastfm' public String source; //请求的图像的大小 //缩略图 or 正常图 public String size; //执行图像获取所需的额外数据 //lastFM - 艺术家需要艺术家的形象 //ablum - 专辑、歌手专辑图像 //file - 需要相册id /